3.0.2
https://github.com/mikeerickson/vue-api-client/settings
node 9.11.2, npm 6.4.0
Clone Repo
Run npm install
Run npm run test:unit
Not sure where this goes haywire, but it works for a little while, then begins to fail (I am not touching the test)
Output
FAIL tests/unit/example.spec.js
● Test suite failed to run
Jest encountered an unexpected token
This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
Here's what you can do:
• To have some of your "node_modules" files transformed, you can specify a custom "transformIgnorePatterns" in your config.
• If you need a custom transformation specify a "transform" option in your config.
• If you simply want to mock your non-JS modules (e.g. binary assets) you can stub them out with the "moduleNameMapper" config option.
You'll find more details and examples of these config options in the docs:
https://jestjs.io/docs/en/configuration.html
Details:
/Users/mikee/Documents/code/js/vue/vue-api-client/tests/unit/example.spec.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import "core-js/modules/es6.array.iterator";
^^^^^^
SyntaxError: Unexpected token import
at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/script_transformer.js:403:17)
Test Suites: 1 failed, 1 total
Tests: 0 total
Snapshots: 0 total
Time: 4.779s
Ran all test suites.
Duplicate of #1879
You can try the following steps:
node_modules and remove package-lock.json, rerun npm installjest --showConfig. Look for cacheDirectory key. Its value is the name of the folder you'll need to remove.npm run test:unit@sodatea ahhhhh snap, now I recall doing cache clear dance to fix this issue in the past. Thank you mucho
Most helpful comment
Duplicate of #1879
You can try the following steps:
node_modulesand removepackage-lock.json, rerunnpm installjest --showConfig. Look forcacheDirectorykey. Its value is the name of the folder you'll need to remove.npm run test:unit