IE11: ng test with differential loading: syntax error when fast-check is used
See original GitHub issueš Bug Report
If fast-check is added to a spec in a fresh Angular 9.1.12 project with differential loading turned on, Karma will report a syntax error in IE11. Upon investigation it seems, that a āclassā keyword lands in the vendor.js bundle served by angular:
class ArrayArbitrary extends _definition_Arbitrary_js__WEBPACK_IMPORTED_MODULE_2__["Arbitrary"] {
//... it looks like further definitions from fast-check follow this line.
To Reproduce
See example repo: https://github.com/delexi/ng-test-fast-check-ie11
Steps to reproduce:
- Create an Angular 9 project:
npx @angular/cli@9.1.12 new fast-check-ie
(or use example repo) - Enable differential loading and install fast-check and IE support for karma (or use example repo)
- Add a simple fast-check test (or use example repo)
- In project root run
ng test --configuration=es5
- If you are quick to press F12 after IE starts up you can capture the syntax error in IEās Console and navigate from there to the correct location in vendor.js mentioned above. Otherwise karmaās console output should mention the syntax error as well.
Expected behavior
I expect that adding fast-check to my angular tests does not break them in IE11.
Your environment
Packages / Softwares | Version(s) |
---|---|
fast-check | 2.4.0 |
node | 12.8.2 |
TypeScript | 3.8.3 |
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:11 (6 by maintainers)
Top Results From Across the Web
IE 11 Syntax error after doing ng serve Ā· Issue #9508 - GitHub
I get this syntax error in main.js (angular 6) pointing to the class statement. Even though my tsonfig.json compiler option is set to...
Read more >Angular IE11 not working. Getting SCRIPT1002 Syntax Error
The issue is caused by Angular 8's differential loading process. ... getting syntax issues because you are trying to use features that IE11...
Read more >How To Fix Your Angular App When It's Not Working in IE11
Sometimes, your application may throw errors in IE11, even when it is working ... Since Angular CLI 8, there is a new feature...
Read more >46110 (IE11: JS "Syntax error" related to wp-polyfill-formdata)
In Internet Explorer 11, there's a JavaScript "Syntax error" related to wp-polyfill-formdata . The error happens in various pages, e.g. in edit.php andĀ ......
Read more >Internet Explorer 11 testing - Office Add-ins - Microsoft Learn
Test your Office Add-in on Internet Explorer 11.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Actually, the workaround I was talking about happens to be in the thread I already mentioned. This and the following comment: https://github.com/angular/angular-cli/issues/9339#issuecomment-360213460. I havenāt actually tried these though.
No worry, Iāll have a look to your issue more precisely and try to come with a better and more sustainable fix.