angular2-jsonapi
angular2-jsonapi copied to clipboard
Error during run test on Jest
After migrate from karma to jest i get error:
Test suite failed to run
/Users/przemyslawpietrzakfrontend/node_modules/lodash-es/find.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import createFind from './_createFind.js';
SyntaxError: Unexpected identifier
at ScriptTransformer._transformAndBuildScript (node_modules/jest-runtime/build/ScriptTransformer.js:440:17)
at Object.<anonymous> (node_modules/angular2-jsonapi/src/models/json-api.model.ts:1:1)
@ghidoz I am running into the same issue, any thoughts on solution?
I found this S.O. thread but it is inconclusive https://stackoverflow.com/questions/57222538/test-suite-failed-to-run-syntax-error-unexpected-identifier
if I remember right....to work along with json api, I created that mocks folder, created angular2-jsonapi.ts file and mocked JsonApiModel...like this(i think, not sure but you can try):
Running into this issue as well.