Jest tests fail after dependencies installed with 'yarn install'
chatch opened this issue · 0 comments
chatch commented
If dependencies are installed with "npm install" the tests run fine.
However if installed with "yarn install" they will fail with module resolution failures:
======================================================================
Cannot find module 'stellar-base' from 'account_response.js'
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
at Object.<anonymous> (node_modules/stellar-sdk/lib/account_response.js:13:19)
FAIL src/lib/tests/utils.test.js
● Test suite failed to run
Cannot find module 'stellar-base' from 'account_response.js'
at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:179:17)
at Object.<anonymous> (node_modules/stellar-sdk/lib/account_response.js:13:19)
=====================================================================
It's not clear to me why this is as "stellar-base" is there under node_modules and require("stellar-base") statement seems fine.
Take a look at jest code and issues ...