@@ -83,38 +83,38 @@ describe("errors", () => {
83
83
const assertProcessExited = ( ) => {
84
84
assert . isTrue (
85
85
isProcessExitCalled ,
86
- "When the action fails, process.exit must be called."
86
+ "When the action fails, process.exit must be called." ,
87
87
) ;
88
88
assert . equal (
89
89
processExitCode ,
90
90
127 ,
91
- "When the action fails, process.exit must be called with 127 by default."
91
+ "When the action fails, process.exit must be called with 127 by default." ,
92
92
) ;
93
93
} ;
94
94
95
95
const assertPrintCommandHelpSuggestionIsNotCalled = ( ) => {
96
96
assert . isFalse (
97
97
isPrintCommandHelpSuggestionExecuted ,
98
- "printCommandHelpSuggestion should not be called when the suggestCommandHelp is not set to the exception."
98
+ "printCommandHelpSuggestion should not be called when the suggestCommandHelp is not set to the exception." ,
99
99
) ;
100
100
} ;
101
101
102
102
it ( "executes the passed action and does not print anything when it is successful" , async ( ) => {
103
103
const { action, printCommandHelpSuggestion } = setupTest ( ) ;
104
104
let result = await errors . beginCommand (
105
105
action ,
106
- printCommandHelpSuggestion
106
+ printCommandHelpSuggestion ,
107
107
) ;
108
108
assert . isTrue (
109
109
result ,
110
- "beginCommand must return the result of the passed action."
110
+ "beginCommand must return the result of the passed action." ,
111
111
) ;
112
112
113
113
actionResult = false ;
114
114
result = await errors . beginCommand ( action , printCommandHelpSuggestion ) ;
115
115
assert . isFalse (
116
116
result ,
117
- "beginCommand must return the result of the passed action."
117
+ "beginCommand must return the result of the passed action." ,
118
118
) ;
119
119
assert . equal ( logger . errorOutput , "" ) ;
120
120
assert . equal ( logger . output , "" ) ;
@@ -136,15 +136,15 @@ describe("errors", () => {
136
136
const assertCallStack = ( ) => {
137
137
assert . isTrue (
138
138
logger . errorOutput . indexOf ( errMsg ) !== - 1 ,
139
- "The error output must contain the error message"
139
+ "The error output must contain the error message" ,
140
140
) ;
141
141
assert . isTrue (
142
- logger . errorOutput . indexOf ( "at Generator. next" ) !== - 1 ,
143
- "The error output must contain callstack"
142
+ logger . errorOutput . indexOf ( "at next" ) !== - 1 ,
143
+ "The error output must contain callstack" ,
144
144
) ;
145
145
assert . isTrue (
146
146
logger . errorOutput . indexOf ( path . join ( "lib" , "common" ) ) !== - 1 ,
147
- "The error output must contain path to lib/common, as this is the location of the file"
147
+ "The error output must contain path to lib/common, as this is the location of the file" ,
148
148
) ;
149
149
} ;
150
150
@@ -213,7 +213,7 @@ describe("errors", () => {
213
213
assertProcessExited ( ) ;
214
214
assert . isTrue (
215
215
isPrintCommandHelpSuggestionExecuted ,
216
- "printCommandHelpSuggestion should be called when the action fails with an error object for which suggestCommandHelp is true."
216
+ "printCommandHelpSuggestion should be called when the action fails with an error object for which suggestCommandHelp is true." ,
217
217
) ;
218
218
} ) ;
219
219
@@ -225,12 +225,12 @@ describe("errors", () => {
225
225
assert . equal ( logger . errorOutput , `${ errMsg } \n` ) ;
226
226
assert . isTrue (
227
227
isProcessExitCalled ,
228
- "When the action fails, process.exit must be called."
228
+ "When the action fails, process.exit must be called." ,
229
229
) ;
230
230
assert . equal (
231
231
processExitCode ,
232
232
errObj . errorCode ,
233
- `When the action fails, process.exit must be called with ${ errObj . errorCode } .`
233
+ `When the action fails, process.exit must be called with ${ errObj . errorCode } .` ,
234
234
) ;
235
235
} ) ;
236
236
@@ -242,12 +242,12 @@ describe("errors", () => {
242
242
assert . equal ( logger . errorOutput , `${ errMsg } \n` ) ;
243
243
assert . isTrue (
244
244
isProcessExitCalled ,
245
- "When the action fails, process.exit must be called."
245
+ "When the action fails, process.exit must be called." ,
246
246
) ;
247
247
assert . equal (
248
248
processExitCode ,
249
249
127 ,
250
- "When the action fails, process.exit must be called with 127 by default."
250
+ "When the action fails, process.exit must be called with 127 by default." ,
251
251
) ;
252
252
} ) ;
253
253
} ) ;
0 commit comments