Closed vbolshutkin closed 7 years ago
Figured it out: new tsconfig is set up for es6 as target. Also, some polyfills are disabled by default in @angular/cli 1.0.0-rc.0
The workaround is to write the following code in src/tsconfig.spec.json
"lib": [
"es2016","es6", "dom"
],
"target": "es5",
and uncomment the last line in polyfills.ts
import 'intl';
Thanks a lot for providing the solution. Out of interest, why do you need to use Phantom?
@lathonez if you use temacity as your CI you cannot spawn chrome instances when the build is running, check this in the Karma documentation: http://karma-runner.github.io/1.0/plus/teamcity.html
Hello i've had this error now, i've performed the changes in "src/tsconfig.spec.json" and the problem remains
I'm using your great project as a reference, but I need the tests to be run in PhantomJS. Earlier it worked well after small modifications:
in package.json under devDepenencies
"karma-phantomjs-launcher": "^1.0.2",
in karma.conf.js add
require('karma-phantomjs-launcher'),
and setbrowsers: ['PhantomJS']
After recent commit 13a6cd6ac94de0897b0e0d3dca65261f9c7ac3a8 it fails with the following message:
I believe, this is related to babel preset, but didn't find a workaround yet