-
Notifications
You must be signed in to change notification settings - Fork 12k
added debug argument to ng test task. #1799
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
Changes from all commits
b2a24e4
fda89ed
58ac230
ad82f9a
61b4b23
67339fd
d74ce89
e6378bd
3d58bdd
9295253
4c073e0
327defb
015b476
cf5c2be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,9 +3,10 @@ | |
const path = require('path'); | ||
const webpack = require('webpack'); | ||
|
||
const getWebpackTestConfig = function (projectRoot, environment, appConfig) { | ||
const getWebpackTestConfig = function (projectRoot, environment, appConfig, debug) { | ||
|
||
const appRoot = path.resolve(projectRoot, appConfig.root); | ||
var debug = typeof debug !== 'undefined' ? debug : false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Linting says this variable is being shadowed. |
||
|
||
return { | ||
devtool: 'inline-source-map', | ||
|
@@ -66,7 +67,7 @@ const getWebpackTestConfig = function (projectRoot, environment, appConfig) { | |
{ test: /\.(jpg|png)$/, loader: 'url-loader?limit=128000' }, | ||
{ test: /\.html$/, loader: 'raw-loader', exclude: [path.resolve(appRoot, appConfig.index)] } | ||
], | ||
postLoaders: [ | ||
postLoaders: debug ? [] : [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the latest webpack update, the loader configs changed a bit and is now a single You're probably going to have to add the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok @filipesilva . i will update this branch to the latest changes in master and fix the linting issue you mentioned. |
||
{ | ||
test: /\.(js|ts)$/, loader: 'sourcemap-istanbul-instrumenter-loader', | ||
exclude: [ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this option being passed into the karma config? I don't think it's being passed in yet.
My suggestion is this: in
karma.conf.js
add in the debug property to theangularCli
options:Then you'll need to also change
packages/angular-cli/tasks/test.ts
to set this totrue
in theoptions
variable that's being passed intokarma.Server
.Make sure it works though, this is the kind of thing I don't know we can really do CI tests without doing really weird stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i actually implemented debug false as default so it doesn't need to be passed. i added an argument to the test command --debug (-d). I think we would add a npm script npm run test:debug which would call ng test --debug
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was tracing back the code and realize you are right. Since we just start karma with all the options that the command receives, the
debug
property will be there. My bad!