FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
angular-cli/packages/@angular/cli/commands/test.ts at master · feicc/angular-cli · GitHub
feicc
/
angular-cli
Public
forked from
angular/angular-cli
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
92
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
angular-cli
/
packages
/
@angular
/
cli
/
commands
/
test.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
135 lines (127 loc) · 3.18 KB
Breadcrumbs
angular-cli
/
packages
/
@angular
/
cli
/
commands
/
test.ts
Copy path
File metadata and controls
135 lines (127 loc) · 3.18 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
const
Command
=
require
(
'../ember-cli/lib/models/command'
)
;
import
TestTask
from
'../tasks/test'
;
import
{
CliConfig
}
from
'../models/config'
;
import
{
oneLine
}
from
'common-tags'
;
const
config
=
CliConfig
.
fromProject
(
)
||
CliConfig
.
fromGlobal
(
)
;
const
testConfigDefaults
=
config
.
getPaths
(
'defaults.build'
,
[
'progress'
,
'poll'
]
)
;
export
interface
TestOptions
{
watch
?:
boolean
;
codeCoverage
?:
boolean
;
singleRun
?:
boolean
;
browsers
?:
string
;
colors
?:
boolean
;
log
?:
string
;
port
?:
number
;
reporters
?:
string
;
sourcemaps
?:
boolean
;
progress
?:
boolean
;
config
:
string
;
poll
?:
number
;
environment
?:
string
;
app
?:
string
;
}
const
TestCommand
=
Command
.
extend
(
{
name
:
'test'
,
aliases
:
[
't'
]
,
description
:
'Run unit tests in existing project.'
,
works
:
'insideProject'
,
availableOptions
:
[
{
name
:
'watch'
,
type
:
Boolean
,
aliases
:
[
'w'
]
,
description
:
'Run build when files change.'
}
,
{
name
:
'code-coverage'
,
type
:
Boolean
,
default
:
false
,
aliases
:
[
'cc'
]
,
description
:
'Coverage report will be in the coverage/ directory.'
}
,
{
name
:
'config'
,
type
:
String
,
aliases
:
[
'c'
]
,
description
:
oneLine
`Use a specific config file.
Defaults to the karma config file in .angular-cli.json.`
}
,
{
name
:
'single-run'
,
type
:
Boolean
,
aliases
:
[
'sr'
]
,
description
:
'Run tests a single time.'
}
,
{
name
:
'progress'
,
type
:
Boolean
,
default
:
testConfigDefaults
[
'progress'
]
,
description
:
'Log progress to the console while in progress.'
}
,
{
name
:
'browsers'
,
type
:
String
,
description
:
'Override which browsers tests are run against.'
}
,
{
name
:
'colors'
,
type
:
Boolean
,
description
:
'Enable or disable colors in the output (reporters and logs).'
}
,
{
name
:
'log-level'
,
type
:
String
,
description
:
'Level of logging.'
}
,
{
name
:
'port'
,
type
:
Number
,
description
:
'Port where the web server will be listening.'
}
,
{
name
:
'reporters'
,
type
:
String
,
description
:
'List of reporters to use.'
}
,
{
name
:
'sourcemaps'
,
type
:
Boolean
,
default
:
true
,
aliases
:
[
'sm'
,
'sourcemap'
]
,
description
:
'Output sourcemaps.'
}
,
{
name
:
'poll'
,
type
:
Number
,
default
:
testConfigDefaults
[
'poll'
]
,
description
:
'Enable and define the file watching poll time period (milliseconds).'
}
,
{
name
:
'environment'
,
type
:
String
,
aliases
:
[
'e'
]
,
description
:
'Defines the build environment.'
}
,
{
name
:
'app'
,
type
:
String
,
aliases
:
[
'a'
]
,
description
:
'Specifies app name to use.'
}
]
,
run
:
function
(
commandOptions
:
TestOptions
)
{
const
testTask
=
new
TestTask
(
{
ui
:
this
.
ui
,
project
:
this
.
project
}
)
;
if
(
commandOptions
.
watch
!==
undefined
&&
!
commandOptions
.
watch
)
{
// if not watching ensure karma is doing a single run
commandOptions
.
singleRun
=
true
;
}
return
testTask
.
run
(
commandOptions
)
;
}
}
)
;
TestCommand
.
overrideCore
=
true
;
export
default
TestCommand
;
Back
|
FazBrowse Home
|
New Git URL