-
Notifications
You must be signed in to change notification settings - Fork 12k
(feat) added argument for karma configuration file #4564
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 5 commits
3e7b167
11da535
d9e064a
79c674b
d4662cf
01e7fef
5e98d7e
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ module.exports = Command.extend({ | |
|
||
availableOptions: [ | ||
{ name: 'environment', type: String, default: 'test', aliases: ['e'] }, | ||
{ name: 'config-file', type: String, aliases: ['c', 'cf']}, | ||
{ name: 'config', type: String, aliases: ['c', 'cf']}, | ||
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. No need to change this, our command overrides this one. |
||
{ name: 'server', type: Boolean, default: false, aliases: ['s'] }, | ||
{ name: 'host', type: String, aliases: ['H'] }, | ||
{ name: 'test-port', type: Number, default: defaultPort, aliases: ['tp'], description: 'The test port to use when running with --server.' }, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
import { ng } from '../../utils/process'; | ||
import { copyFile } from '../../utils/fs'; | ||
|
||
export default function () { | ||
// make sure both --watch=false and --single-run work | ||
return ng('test', '--single-run') | ||
.then(() => ng('test', '--watch=false')); | ||
.then(() => ng('test', '--watch=false')) | ||
.then(() => copyFile('./karma.conf.js', './karma.conf.bis.js')) | ||
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. Use moveFile instead of copy please, otherwise the feature might be broken and we don't know since the old file is used. The test harness will take care of moving it back after the test. |
||
.then(() => ng('test', '--single-run', '--config', 'karma.conf.bis.js')); | ||
} |
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.
Use just the
c
alias instead. I understand the old command had both, but we don't use it so no user would know and this way we don't use up another possible alias.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.
Updated with your comments. Though, 'cc' and 'c' for respectively code coverage and config is little bit scary, no ?
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 think it's ok enough. It's true that
-c -cc
is kinda weird, but I'd expect-c
to be used much more than-cc
, and less so them together. And when users use them together, they shouldn't have to change-c
to-cf
.Looking at the PoV of making mistakes, since before both
-c
and-cf
were allowed then you could just as easily mistakenly do-cc
instead if you were used to-c
.