@@ -82,51 +82,51 @@ describe('help', () => {
82
82
{
83
83
name : 'init' ,
84
84
alias : 'c' ,
85
- helpOutput : 'webpack init|c [generation-path] [options]' ,
85
+ usage : 'webpack init|c [generation-path] [options]' ,
86
86
} ,
87
87
{
88
88
name : 'info' ,
89
89
alias : 'i' ,
90
- helpOutput : 'webpack info|i [options]' ,
90
+ usage : 'webpack info|i [options]' ,
91
91
} ,
92
92
{
93
93
name : 'loader' ,
94
94
alias : 'l' ,
95
- helpOutput : 'webpack loader|l [output-path]' ,
95
+ usage : 'webpack loader|l [output-path] [options ]' ,
96
96
} ,
97
97
{
98
98
name : 'migrate' ,
99
99
alias : 'm' ,
100
- helpOutput : 'webpack migrate|m <config-path> [new-config-path]' ,
100
+ usage : 'webpack migrate|m <config-path> [new-config-path]' ,
101
101
} ,
102
102
{
103
103
name : 'plugin' ,
104
104
alias : 'p' ,
105
- helpOutput : 'webpack plugin|p [output-path]' ,
105
+ usage : 'webpack plugin|p [output-path] [options ]' ,
106
106
} ,
107
107
{
108
108
name : 'configtest' ,
109
109
alias : 't' ,
110
- helpOutput : 'webpack configtest|t [config-path]' ,
110
+ usage : 'webpack configtest|t [config-path]' ,
111
111
} ,
112
112
{
113
113
name : 'watch' ,
114
114
alias : 'w' ,
115
- helpOutput : 'webpack watch|w [entries...] [options]' ,
115
+ usage : 'webpack watch|w [entries...] [options]' ,
116
116
} ,
117
117
{
118
118
name : 'serve' ,
119
119
alias : 's' ,
120
- helpOutput : 'webpack serve|s [entries...] [options]' ,
120
+ usage : 'webpack serve|s [entries...] [options]' ,
121
121
} ,
122
122
{
123
123
name : 'build' ,
124
124
alias : 'b' ,
125
- helpOutput : 'webpack build|bundle|b [entries...] [options]' ,
125
+ usage : 'webpack build|bundle|b [entries...] [options]' ,
126
126
} ,
127
127
] ;
128
128
129
- commands . forEach ( ( { name, alias, helpOutput } ) => {
129
+ commands . forEach ( ( { name, alias, usage } ) => {
130
130
it ( `should show help information for '${ name } ' command using the "--help" option` , async ( ) => {
131
131
const { exitCode, stderr, stdout } = await run ( __dirname , [ name , '--help' ] ) ;
132
132
@@ -141,39 +141,39 @@ describe('help', () => {
141
141
142
142
expect ( exitCode ) . toBe ( 0 ) ;
143
143
expect ( stderr ) . toBeFalsy ( ) ;
144
- expect ( stdout ) . toContain ( helpOutput ) ;
144
+ expect ( stdout ) . toContain ( usage ) ;
145
145
} ) ;
146
146
147
147
it ( `should show help information for '${ name } ' command using command syntax` , async ( ) => {
148
148
const { exitCode, stderr, stdout } = await run ( __dirname , [ 'help' , name ] ) ;
149
149
150
150
expect ( exitCode ) . toBe ( 0 ) ;
151
151
expect ( stderr ) . toBeFalsy ( ) ;
152
- expect ( stdout ) . toContain ( helpOutput ) ;
152
+ expect ( stdout ) . toContain ( usage ) ;
153
153
} ) ;
154
154
155
155
it ( `should show help information for '${ alias } ' command using the "--help" option` , async ( ) => {
156
156
const { exitCode, stderr, stdout } = await run ( __dirname , [ alias , '--help' ] ) ;
157
157
158
158
expect ( exitCode ) . toBe ( 0 ) ;
159
159
expect ( stderr ) . toBeFalsy ( ) ;
160
- expect ( stdout ) . toContain ( helpOutput ) ;
160
+ expect ( stdout ) . toContain ( usage ) ;
161
161
} ) ;
162
162
163
163
it ( `should show help information for '${ alias } ' command using the "--help verbose" option` , async ( ) => {
164
164
const { exitCode, stderr, stdout } = await run ( __dirname , [ alias , '--help' , 'verbose' ] ) ;
165
165
166
166
expect ( exitCode ) . toBe ( 0 ) ;
167
167
expect ( stderr ) . toBeFalsy ( ) ;
168
- expect ( stdout ) . toContain ( helpOutput ) ;
168
+ expect ( stdout ) . toContain ( usage ) ;
169
169
} ) ;
170
170
171
171
it ( `should show help information for '${ alias } ' command using command syntax` , async ( ) => {
172
172
const { exitCode, stderr, stdout } = await run ( __dirname , [ 'help' , alias ] ) ;
173
173
174
174
expect ( exitCode ) . toBe ( 0 ) ;
175
175
expect ( stderr ) . toBeFalsy ( ) ;
176
- expect ( stdout ) . toContain ( helpOutput ) ;
176
+ expect ( stdout ) . toContain ( usage ) ;
177
177
} ) ;
178
178
179
179
it ( `should show help information for '${ name } ' and respect the "--color" flag using the "--help" option` , async ( ) => {
@@ -182,7 +182,7 @@ describe('help', () => {
182
182
expect ( exitCode ) . toBe ( 0 ) ;
183
183
expect ( stderr ) . toBeFalsy ( ) ;
184
184
expect ( stdout ) . toContain ( '\x1b[1m' ) ;
185
- expect ( stdout ) . toContain ( helpOutput ) ;
185
+ expect ( stdout ) . toContain ( usage ) ;
186
186
187
187
if ( ! isMacOS ) {
188
188
expect ( stdout ) . toContain ( 'Made with ♥ by the webpack team' ) ;
@@ -195,7 +195,7 @@ describe('help', () => {
195
195
expect ( exitCode ) . toBe ( 0 ) ;
196
196
expect ( stderr ) . toBeFalsy ( ) ;
197
197
expect ( stdout ) . not . toContain ( '\x1b[1m' ) ;
198
- expect ( stdout ) . toContain ( helpOutput ) ;
198
+ expect ( stdout ) . toContain ( usage ) ;
199
199
200
200
if ( ! isMacOS ) {
201
201
expect ( stdout ) . toContain ( 'Made with ♥ by the webpack team' ) ;
0 commit comments