Questions tagged [jest-webpack-alias]

jest-webpack-alias is the officially recommended solution for Facebook's jest test system.

jest-webpack-alias is the officially recommended solution for Facebook's jest test system.

3 questions
6
votes
1 answer

How do I use jest with coffeescript and ES6/ES2015 (e.g. via Babel)?

My team has been using both coffeescript and ES6/ES2015 (via Babel) in our project. Since the files are ultimately compatible due to Babel, it's been working great. But I can't figure out how we can write a jest test that allows both. I've found…
Tyler Collier
  • 11,489
  • 9
  • 73
  • 80
1
vote
1 answer

Vue Jest Aliases Configuration

I have an error when I want to run Jest because of moduleNameMapper settings. I tried several methods, but nothing changes. To reproduce: clone the repo: https://github.com/zoztorun/reproduce-webpack-alias-error npm install npm run test
user10736003
1
vote
1 answer

Jest:moduleNameMapper: mocks do not work for imported modules of mapped modules using "moduleNameMapper"

I use jest with webpack. Webpack is configured to use alias for some imports: alias: { shared: path.resolve(process.cwd(), "some-lib/src"), }, modules: ["app", "node_modules", "some-lib"], some-lib is git submodule added to the project. When I'm…
alex.mironov
  • 2,834
  • 6
  • 27
  • 41