Open madhu-guruprasad opened 7 years ago
Could you post the contents of your webpack config and babelrc?
If you could create a repo with these files that I could npm install
and npm test
to see the issue, that would be even better.
The issue might have to do with you using configureUsingMochaContext
and setFilename
together; I don't have any tests covering that use-case (but if it doesn't work, it should be changed to work). I'll investigate this weekend.
Is there an update on this issue? It's impacting our project rather significantly
Hi @marie-hughes, are you using configureUsingMochaContext
together with setFilename
? If you are testing using Mocha, it is recommended to either use configureUsingMochaContext
on its own (without setFilename
), or use setFilename
and setTestName
together (without configureUsingMochaContext
). Does using the library in either of those configurations resolve your issue?
I am using this package with Mocha, and setting a snap files explicitly using setFilename. When I run the tests, it shows as successful every time (even after changes). However, there are no snapshot files created anywhere in the directory structure. Here's my setup - I have a test_helper.js file -
A sample test file -
I'm compiling using webpack. This is the npm script -
"mocha-webpack --webpack-config webpack.test.config.js \"src/**/*.test.js\" --require 'test/test_helper.js'"