x)- [x] bug report -> please search issues before submitting
- [ ] feature request
macOS Sierra (10.12.5)
Chrome 59.0.3071.109 (Official Build) (64-bit)
@angular/cli: 1.2.0
node: 7.4.0
os: darwin x64
@angular/animations: 4.1.3
@angular/common: 4.1.3
@angular/compiler: 4.1.3
@angular/core: 4.1.3
@angular/forms: 4.1.3
@angular/http: 4.1.3
@angular/material: 2.0.0-beta.7
@angular/platform-browser: 4.1.3
@angular/platform-browser-dynamic: 4.1.3
@angular/platform-server: 4.1.3
@angular/router: 4.1.3
@angular/cli: 1.2.0
@angular/compiler-cli: 4.1.3
When I run ng test I receive an error and none of my tests are executed.
However, as soon as I change any of my *.spec.ts files, it re-runs, the same error appears, but this time all tests are executed.
The first time when I run ng test:
10% building modules 1/1 modules 0 active05 07 2017 16:31:42.276:WARN [karma]: No captured browser, open http://localhost:9876/
05 07 2017 16:31:42.284:INFO [karma]: Karma v1.7.0 server started at http://0.0.0.0:9876/
05 07 2017 16:31:42.284:INFO [launcher]: Launching browser Chrome with unlimited concurrency
05 07 2017 16:31:42.293:INFO [launcher]: Starting browser Chrome
05 07 2017 16:32:12.899:WARN [karma]: No captured browser, open http://localhost:9876/
05 07 2017 16:32:13.248:INFO [Chrome 59.0.3071 (Mac OS X 10.12.5)]: Connected on socket Q-I0JthYl0AD15gQAAAA with id 68247212
Chrome 59.0.3071 (Mac OS X 10.12.5) LOG: '>>>>>>', '', 'Error: STACKTRACE TRACKING'
Chrome 59.0.3071 (Mac OS X 10.12.5) LOG: '>>>>>>', '', 'Error: STACKTRACE TRACKING'
Chrome 59.0.3071 (Mac OS X 10.12.5) LOG: '>>>>>>', ' at __SEP_TAG__ (http://localhost:9876/_karma_webpack_/vendor.bundle.js:2770:37) [<root>]', ' at captureStackTraces (http://localhost:9876/_karma_webpack_/vendor.bundle.js:2770:37) [<root>]'
Chrome 59.0.3071 (Mac OS X 10.12.5) LOG: '>>>>>>', ' at __SEP_TAG__ (http://localhost:9876/_karma_webpack_/vendor.bundle.js:2770:37) [<root>]', ' at captureStackTraces (http://localhost:9876/_karma_webpack_/vendor.bundle.js:2770:37) [<root>]'
Chrome 59.0.3071 (Mac OS X 10.12.5): Executed 0 of 0 ERROR (0.001 secs / 0 secs)
Therefore, 0 of my tests are executed. However, as soon as I change any of my *.spec.ts files, it re-runs and the output is:
Chrome 59.0.3071 (Mac OS X 10.12.5) LOG: '>>>>>>', '', 'Error: STACKTRACE TRACKING'
Chrome 59.0.3071 (Mac OS X 10.12.5) LOG: '>>>>>>', '', 'Error: STACKTRACE TRACKING'
Chrome 59.0.3071 (Mac OS X 10.12.5) LOG: '>>>>>>', ' at __SEP_TAG__ (http://localhost:9876/_karma_webpack_/vendor.bundle.js:37188:37) [<root>]', ' at captureStackTraces (http://localhost:9876/_karma_webpack_/vendor.bundle.js:37188:37) [<root>]'
Chrome 59.0.3071 (Mac OS X 10.12.5) LOG: '>>>>>>', ' at __SEP_TAG__ (http://localhost:9876/_karma_webpack_/vendor.bundle.js:37188:37) [<root>]', ' at captureStackTraces (http://localhost:9876/_karma_webpack_/vendor.bundle.js:37188:37) [<root>]'
Chrome 59.0.3071 (Mac OS X 10.12.5): Executed 6 of 6 SUCCESS (0.003 secs / 0.011 secs)
And all my tests are executed! But still, I get the error in front.
This error means nothing to me. I am lost. Does anybody know how I can resolve it?
I have the latest versions of all testing related dev dependencies in my package.json:
"jasmine-core": "2.6.4",
"jasmine-spec-reporter": "4.1.1",
"karma": "1.7.0",
"karma-chrome-launcher": "2.2.0",
"karma-cli": "1.0.1",
"karma-coverage-istanbul-reporter": "1.3.0",
"karma-jasmine": "1.1.0",
"karma-jasmine-html-reporter": "0.2.2"
When I run ng test I expect all tests to execute.
My karma.conf.js file is the default one (I haven't change anything):
// Karma configuration file, see link for more information
// https://karma-runner.github.io/0.13/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular/cli/plugins/karma')
],
client:{
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
angularCli: {
environment: 'dev'
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
I finally resolved it! 馃帀 鉂わ笍
Here's how (in case anyone has the same issue):
tsconfig.json and tsconfig.spec.json)@superKalo Thank you. I also ran into this issue and could have sworn I had refreshed my tsconfig files but I hadn't and this fixed it.
@superKalo where did you upgrade zone.js? just on the root project or did you have to upgrade in other places?
@webmutation yes, just in the root project.
Sorry, the issue returned, I'm not sure why those two steps worked. On further examination the root issue was that I had misspelled testTsconfig as testTsConfig in .angular-cli.json
Chrome 66.0.3359 (Windows 7.0.0): Executed 0 of 0 ERROR (0.221 secs / 0 secs)
hello dears i am try all these step but did not solve ,, what i do :(
`
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
singleRun: false
});
};
`
same as @tito525
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._