FAIL src/app/app.component.spec.ts (5.944s)
AppComponent
✕ should create the app (96ms)
● AppComponent › should create the app
SyntaxError: The string did not match the expected pattern.
at XMLHttpRequest.open [as __zone_symbol__open] (node_modules/jest-preset-angular/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:475:15)
at Array.map (native)
● AppComponent › should create the app
SyntaxError: The string did not match the expected pattern.
at XMLHttpRequest.open [as __zone_symbol__open] (node_modules/jest-preset-angular/node_modules/jsdom/lib/jsdom/living/xmlhttprequest.js:475:15)
at Array.map (native)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 7.915s
Ran all test suites.
However, the error can be easily fixed if it's changed to inline like the following,
I know this is jest-angular-preset's plugins regex that fails to parse the line breaks but if you think that little change in code won't hurt I can create a PR :).
The following block of code is causing a failure when I am using Jest with jest-angular-preset plugin.
https://github.com/surmon-china/ngx-quill-editor/blob/512310bf02f5003d885f9ef9711c325605f3c7f5/quillEditor.component.ts#L20-L25
The details of the error is,
However, the error can be easily fixed if it's changed to inline like the following,
I know this is jest-angular-preset's plugins regex that fails to parse the line breaks but if you think that little change in code won't hurt I can create a PR :).