hyperledger-cacti / cacti

Hyperledger Cacti is a new approach to the blockchain interoperability problem
https://wiki.hyperledger.org/display/cactus
Apache License 2.0
344 stars 285 forks source link

test(jest): fix jest-haste-map: Haste module naming collisions #1645

Open petermetz opened 2 years ago

petermetz commented 2 years ago

Certain warnings are being generated when running Jest tests and we should look into fixing them. They are talking about module name collisions which shouldn't be too hart to fix (in theory, as usual).

Should also look into the negative side-effects of these warnings because right now I can only guess that it's probably worsening the performance of the test executions, but that's pure speculation based on the warning messages themselves.

jest-haste-map: Haste module naming collision: validatorDriver
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/packages/cactus-plugin-ledger-connector-go-ethereum-socketio/src/test/typescript/unit-test/package.json
    * <rootDir>/packages/cactus-plugin-ledger-connector-fabric-socketio/src/test/typescript/unit-test/package.json

jest-haste-map: Haste module naming collision: @hyperledger/cactus-dummy-package
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/packages/cactus-cmd-api-server/dist/lib/test/resources/cactus-dummy-package/package.json
    * <rootDir>/packages/cactus-cmd-api-server/src/test/resources/cactus-dummy-package/package.json

jest-haste-map: Haste module naming collision: asset-transfer-basic
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/packages/cactus-plugin-ledger-connector-fabric/dist/lib/test/typescript/fixtures/go/basic-asset-transfer/chaincode-javascript/package.json
    * <rootDir>/packages/cactus-plugin-ledger-connector-fabric/dist/lib/test/typescript/fixtures/go/basic-asset-transfer/chaincode-typescript/package.json

jest-haste-map: Haste module naming collision: dependent
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/contribs/Fujitsu-ConnectionChain/connection-chain/environment/base/cc_env/servers/cooperation/ecSide/ec1_connector/lib/dependent/package.json
    * <rootDir>/contribs/Fujitsu-ConnectionChain/connection-chain/environment/base/cc_env/servers/cooperation/ecSide/ec2_connector/lib/dependent/package.json

jest-haste-map: Haste module naming collision: connector
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/contribs/Fujitsu-ConnectionChain/connection-chain/environment/base/cc_env/servers/cooperation/ecSide/ec1_connector/package.json
    * <rootDir>/contribs/Fujitsu-ConnectionChain/connection-chain/environment/base/cc_env/servers/cooperation/ecSide/ec2_connector/package.json

jest-haste-map: Haste module naming collision: adapter
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/contribs/Fujitsu-ConnectionChain/connection-chain/environment/base/cc_env/servers/cooperation/coreSide/ec1_adapter/package.json
    * <rootDir>/contribs/Fujitsu-ConnectionChain/connection-chain/environment/base/cc_env/servers/cooperation/coreSide/ec2_adapter/package.json

jest-haste-map: Haste module naming collision: webapi
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/examples/cartrade/validatorDriver/package.json
    * <rootDir>/examples/discounted-cartrade/validatorDriver/package.json

jest-haste-map: Haste module naming collision: testcli
  The following files share their name; please adjust your hasteImpl:
    * <rootDir>/packages-python/cactus_validator_socketio/testcli/package.json
    * <rootDir>/packages-python/cactus_validator_socketio_iroha/testcli/package.json
Leeyoungone commented 2 years ago

Hey @petermetz, what did you run to get these warnings? Currently, when you run yarn jest it only pulls up this:

jest-haste-map: duplicate manual mock found: ConfigUtil
  The following files share their name; please delete one of them:
    * <rootDir>/packages/cactus-cmd-socketio-server/dist/src/main/typescript/routing-interface/util/__mocks__/ConfigUtil.js
    * <rootDir>/packages/cactus-cmd-socketio-server/src/main/typescript/routing-interface/util/__mocks__/ConfigUtil.ts