mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-17 19:13:34 +08:00
fix(@angular/cli): remove default for test runners
These are specified in the config file and defaulting them in CLI makes karma.conf.js useless.
This commit is contained in:
parent
8d8c5de080
commit
e7966a2465
@ -119,7 +119,7 @@ You can run tests with coverage via `--code-coverage`. The coverage report will
|
||||
<details>
|
||||
<summary>single-run</summary>
|
||||
<p>
|
||||
<code>--single-run</code> (aliases: <code>-sr</code>) <em>default value: false</em>
|
||||
<code>--single-run</code> (aliases: <code>-sr</code>)
|
||||
</p>
|
||||
<p>
|
||||
Run tests a single time.
|
||||
|
@ -1,6 +1,6 @@
|
||||
const Command = require('../ember-cli/lib/models/command');
|
||||
import TestTask from '../tasks/test';
|
||||
import {CliConfig} from '../models/config';
|
||||
import { CliConfig } from '../models/config';
|
||||
import { oneLine } from 'common-tags';
|
||||
|
||||
const config = CliConfig.fromProject() || CliConfig.fromGlobal();
|
||||
@ -33,7 +33,6 @@ const TestCommand = Command.extend({
|
||||
{
|
||||
name: 'watch',
|
||||
type: Boolean,
|
||||
default: true,
|
||||
aliases: ['w'],
|
||||
description: 'Run build when files change.'
|
||||
},
|
||||
@ -54,7 +53,6 @@ const TestCommand = Command.extend({
|
||||
{
|
||||
name: 'single-run',
|
||||
type: Boolean,
|
||||
default: false,
|
||||
aliases: ['sr'],
|
||||
description: 'Run tests a single time.'
|
||||
},
|
||||
@ -110,13 +108,13 @@ const TestCommand = Command.extend({
|
||||
}
|
||||
],
|
||||
|
||||
run: function(commandOptions: TestOptions) {
|
||||
run: function (commandOptions: TestOptions) {
|
||||
const testTask = new TestTask({
|
||||
ui: this.ui,
|
||||
project: this.project
|
||||
});
|
||||
|
||||
if (!commandOptions.watch) {
|
||||
if (commandOptions.watch !== undefined && !commandOptions.watch) {
|
||||
// if not watching ensure karma is doing a single run
|
||||
commandOptions.singleRun = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user