If I write invalid test code it fails to compile - obviously
however when I run npm test all the tests pass (it doesn't run the invalid code)
I can see the parse errors in the console output however presumably if this was happening on a CI server it would consider the tests passed? So PRs which created invalid test code would still be repoted as passing (unless I have the wrong end of the stick)
Just wondering if you have any thoughts on making npm test report an error on parse errors of test code..
I believe you're right, and it would be wise to make it fail. I'll try to get a PR up sometime today or tomorrow, unless you have any immediate ideas :).
@davezuko do we have an update to this? I've been trying to get the tests to fail and I have been having a bear of a time trying to get it to do so.
If it is of any help, I tried to implement the following webpack plugins in the webpack.config.js file that are listed in this github issue.
While I am not positive, but it seems that the plugins that were suggested for karma-webpack haven't helped me out yet. I was doing some research and I am going to see if I can track it down again but I think I recall hearing that require.context() sets modules as optional so if there is an error, the file isn't loaded.
This should be fixed with the above PR. Thanks!
Most helpful comment
I believe you're right, and it would be wise to make it fail. I'll try to get a PR up sometime today or tomorrow, unless you have any immediate ideas :).