"npm test" is reporting errors in console
See original GitHub issueDescribe the bug Execute:
- npm install
- npm test
Tests are green but there are errors in the console:
SyntaxError: Invalid or unexpected token at new Script (vm.js:79:7) at ScriptTransformer._transformAndBuildScript (C:\Users\jbiehler\Git\opendrinks\node_modules\jest-runtime\build\script_transformer.js:403:17) at ScriptTransformer.transform (C:\Users\jbiehler\Git\opendrinks\node_modules\jest-runtime\build\script_transformer.js:448:19) at Runtime._execModule (C:\Users\jbiehler\Git\opendrinks\node_modules\jest-runtime\build\index.js:640:53) at Runtime.requireModule (C:\Users\jbiehler\Git\opendrinks\node_modules\jest-runtime\build\index.js:376:14) at Runtime.requireModuleOrMock (C:\Users\jbiehler\Git\opendrinks\node_modules\jest-runtime\build\index.js:463:19) at require (C:\Users\jbiehler\Git\opendrinks\src\recipes\index.js:35:14) at getRecipe (C:\Users\jbiehler\Git\opendrinks\src\recipes\index.js:48:86) at func (C:\Users\jbiehler\Git\opendrinks\src\recipes\index.js:5:43) at Array.map (<anonymous>)
This was tested with the current master branch.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
@alfg you are right. I did not have seen the config for jest-transform-stub. Works now after adding “jpeg” to the regex, too. So I removed the other code.
I can’t check right now, but can you try adding
jpeg
to the regex on: https://github.com/alfg/opendrinks/blob/master/jest.config.js#L5