Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(cbdc-example): the tests of the CBDC app are not running #3034

Closed
AndreAugusto11 opened this issue Feb 28, 2024 · 0 comments · Fixed by #3035
Closed

bug(cbdc-example): the tests of the CBDC app are not running #3034

AndreAugusto11 opened this issue Feb 28, 2024 · 0 comments · Fixed by #3035
Labels
bug Something isn't working

Comments

@AndreAugusto11
Copy link
Contributor

Describe the bug

The tests of the CBDC app are failing due to a problem with the chai package.

To Reproduce

When running "npm run test" in examples/cactus-example-cbdc-bridging-backend an error is thrown.

Expected behavior

All tests passing.

Logs/Stack traces

> @hyperledger/[email protected] test
> nyc cucumber-js --tags @besu ./src/test/typescript/cucumber/features/*.feature --require-module ts-node/register --require './src/test/typescript/cucumber/*/*.ts'

Error [ERR_REQUIRE_ESM]: require() of ES Module /home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/get-func-name/index.js from /home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/chai/lib/chai/utils/inspect.js not supported.
Instead change the require of index.js in /home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/chai/lib/chai/utils/inspect.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:62:4)
    at Object.<anonymous> (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/chai/lib/chai/utils/inspect.js:4:15)
    at Module.replacementCompile (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:58:13)
    at Object.<anonymous> (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:62:4)
    at Object.<anonymous> (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/chai/lib/chai/utils/objDisplay.js:11:15)
    at Module.replacementCompile (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:58:13)
    at Object.<anonymous> (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:62:4)
    at Object.<anonymous> (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/chai/lib/chai/utils/getMessage.js:13:18)
    at Module.replacementCompile (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:58:13)
    at Object.<anonymous> (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:62:4)
    at Object.<anonymous> (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/chai/lib/chai/utils/index.js:34:22)
    at Module.replacementCompile (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:58:13)
    at Object.<anonymous> (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:62:4)
    at Object.<anonymous> (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/chai/lib/chai.js:25:12)
    at Module.replacementCompile (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:58:13)
    at Object.<anonymous> (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:62:4)
    at Object.<anonymous> (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/chai/index.js:1:18)
    at Module.replacementCompile (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:58:13)
    at Object.<anonymous> (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:62:4)
    at Object.<anonymous> (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/src/test/typescript/cucumber/steps/besu-gateway.steps.ts:7:16)
    at m._compile (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/ts-node/dist/index.js:327:29)
    at Module.replacementCompile (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:58:13)
    at /home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/append-transform/index.js:62:4
    at require.extensions.<computed> [as .ts] (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/ts-node/dist/index.js:329:16)
    at /home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/cucumber/lib/cli/index.js:142:42
    at Array.forEach (<anonymous>)
    at Cli.getSupportCodeLibrary (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/cucumber/lib/cli/index.js:142:22)
    at /home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/cucumber/lib/cli/index.js:169:41
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/cucumber/lib/cli/index.js:44:103)
    at _next (/home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend/node_modules/cucumber/lib/cli/index.js:46:194)
----------|----------|----------|----------|----------|-------------------|
File      |  % Stmts | % Branch |  % Funcs |  % Lines | Uncovered Line #s |
----------|----------|----------|----------|----------|-------------------|
All files |        0 |        0 |        0 |        0 |                   |
----------|----------|----------|----------|----------|-------------------|
npm ERR! Lifecycle script `test` failed with error: 
npm ERR! Error: command failed 
npm ERR!   in workspace: @hyperledger/[email protected] 
npm ERR!   at location: /home/andre_augusto/cacti/examples/cactus-example-cbdc-bridging-backend 
@AndreAugusto11 AndreAugusto11 added the bug Something isn't working label Feb 28, 2024
@AndreAugusto11 AndreAugusto11 changed the title fix(cbdc-example): the tests of the CBDC app are not running bug(cbdc-example): the tests of the CBDC app are not running Feb 28, 2024
AndreAugusto11 added a commit to AndreAugusto11/cacti that referenced this issue Feb 28, 2024
* Chai was removed as dependency of the cbdc-backend package
* A test scenario was removed in the 'bridge-back' feature due to
having duplicated logic with another one in the same file
* Some tests were failing due to timeouts, so we added an explicit
and generous timeout limit for each step

closes hyperledger-cacti#3034

Signed-off-by: André Augusto <[email protected]>
AndreAugusto11 added a commit to AndreAugusto11/cacti that referenced this issue Feb 28, 2024
* Chai was removed as dependency of the cbdc-backend package
* A test scenario was removed in the 'bridge-back' feature due to
having duplicated logic with another one in the same file
* Some tests were failing due to timeouts, so we added an explicit
and generous timeout limit for each step

closes hyperledger-cacti#3034

Signed-off-by: André Augusto <[email protected]>
petermetz pushed a commit to AndreAugusto11/cacti that referenced this issue Feb 28, 2024
* Chai was removed as dependency of the cbdc-backend package
* A test scenario was removed in the 'bridge-back' feature due to
having duplicated logic with another one in the same file
* Some tests were failing due to timeouts, so we added an explicit
and generous timeout limit for each step

closes hyperledger-cacti#3034

Signed-off-by: André Augusto <[email protected]>
AndreAugusto11 added a commit to AndreAugusto11/cacti that referenced this issue Feb 29, 2024
* Chai was removed as dependency of the cbdc-backend package
* A test scenario was removed in the 'bridge-back' feature due to
having duplicated logic with another one in the same file
* Some tests were failing due to timeouts, so we added an explicit
and generous timeout limit for each step

closes hyperledger-cacti#3034

Signed-off-by: André Augusto <[email protected]>
AndreAugusto11 added a commit to AndreAugusto11/cacti that referenced this issue Feb 29, 2024
* Chai was removed as dependency of the cbdc-backend package
* A test scenario was removed in the 'bridge-back' feature due to
having duplicated logic with another one in the same file
* Some tests were failing due to timeouts, so we added an explicit
and generous timeout limit for each step

closes hyperledger-cacti#3034

Signed-off-by: André Augusto <[email protected]>
outSH pushed a commit that referenced this issue Mar 1, 2024
* Chai was removed as dependency of the cbdc-backend package
* A test scenario was removed in the 'bridge-back' feature due to
having duplicated logic with another one in the same file
* Some tests were failing due to timeouts, so we added an explicit
and generous timeout limit for each step

closes #3034

Signed-off-by: André Augusto <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant