Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
b2a24e4fda89ed58ac230ad82f9a61b4b2367339fdd74ce89e6378bd3d58bdd92952534c073e0327defb015b476cf5c2beFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
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; | ||
Contributor 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 ? [] : [ | ||
Contributor 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 ContributorAuthor 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.jsadd in the debug property to theangularClioptions:Then you'll need to also change
packages/angular-cli/tasks/test.tsto set this totruein theoptionsvariable 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
debugproperty will be there. My bad!