My module imports modules in that manner:
const { Item, Item1 } = require('@v2/helpers');
This is my package.json:
"_moduleAliases": { "@v2/helpers": "src/v2-helpers" }
Then in a test file I try to import a file who imports in the above mentioned manner and it gets failed because Jest cannot import those modules.
Test suite failed to run
Cannot find module '@v2/helpers' from 'src/path/to/my-module.js'
What to do?
Try using moduleNameMapper
(jest.config.js)