, Angular CLI 1.0. * Chrome Windows 7.
karma.conf.js
. singleRun: false
,
:
customLaunchers: {
ChromeDebug: {
base: 'Chrome',
flags: [ '--remote-debugging-port=9333' ]
}
}
.vscode/launch.json
:
{
"type": "chrome",
"request": "attach",
"name": "Unit tests",
"address": "localhost",
"port": 9333,
"sourceMaps": true,
"webRoot": "${workspaceRoot}"
},
ng test --browsers ChromeDebug
Chrome. - :
01 06 2017 16:07:29.276:INFO [launcher]: Launching browser ChromeDebug with unlimited concurrency
.spec.ts
.spec.ts
.
Visual Studio Code Unit tests
F5 ( " ").
Shift+Ctrl+F5
Chrome, .
package.json :
"test-debug": "ng test --browsers ChromeDebug",
, ng test
, :
npm run test-debug
: