-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Karma unit tests fail with Angular 4 and older browsers #5185
Comments
The full log of my project build can be found here: https://travis-ci.org/Ionaru/EVE-Track/jobs/206996897 |
The (recently introduced) |
I tried that, but the error still existed, I also tried setting On a side note, the new tsconfig.app.json and tsconfig.spec.json don't appear to play nice with IntelliJ or Webstorm, is that a known issue? |
Hmm, weird, it solved it for me... Yeah the multiple tsconfig issue in IDEs is known (see comment and response here #5046 (comment) and issue #5175) |
@Ionaru I got PhantomJS working with RC1 and Angular 2.4.x. I set
in Note, you need to install If you use Angular 4.x, then uncomment only these:
|
The changes in polyfills are in line with having the values in there commented out. If you need/want to support other browsers uncomment what is needed. The change to output es5 instead of es6 should happen and I will push up a PR shortly. |
having this issue with @angular/cli 1.6.8 and @angular 5.2.3 |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
OS?
Linux, Ubuntu 16.10
Versions.
@angular/cli: 1.0.0-rc.0
node: 7.5.0
os: linux x64
@angular/common: 4.0.0-rc.2
@angular/compiler: 4.0.0-rc.2
@angular/core: 4.0.0-rc.2
@angular/forms: 4.0.0-rc.2
@angular/http: 4.0.0-rc.2
@angular/platform-browser: 4.0.0-rc.2
@angular/platform-browser-dynamic: 4.0.0-rc.2
@angular/router: 4.0.0-rc.2
@angular/cli: 1.0.0-rc.0
@angular/compiler-cli: 4.0.0-rc.2
Repro steps.
ng new App -ng4
cd App
npm i karma-phantomjs-launcher --save-dev
edit karma.conf.js to require karma-phantomjs-launcher
edit karma.conf.js to set PhantomJS as browser
ng test --single-run
The log given by the failure.
I observed several other similar errors when testing on Saucelabs, but that one above appears the most often for me and I was able to reproduce it locally.
Mention any other details that might be useful.
I'm using PhantomJS to simulate an older browser, I get the same error from IE11, Safari 6, Chrome 48 and Firefox 48 on Saucelabs with my project
Tests do run correctly on latest Chrome, Firefox and Edge
I suspect this has something to do with Typescript not being properly compiled to ES5.
The text was updated successfully, but these errors were encountered: