File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ describe('cli args parsing', () => {
2121 categoryNetwork : true ,
2222 'auto-connect' : undefined ,
2323 autoConnect : undefined ,
24+ 'performance-crux' : true ,
25+ performanceCrux : true ,
2426 'usage-statistics' : true ,
2527 usageStatistics : true ,
2628 } ;
@@ -272,4 +274,24 @@ describe('cli args parsing', () => {
272274 ] ) ;
273275 assert . strictEqual ( disabledArgs . usageStatistics , false ) ;
274276 } ) ;
277+
278+ it ( 'parses performance crux flag' , async ( ) => {
279+ const defaultArgs = parseArguments ( '1.0.0' , [ 'node' , 'main.js' ] ) ;
280+ assert . strictEqual ( defaultArgs . performanceCrux , true ) ;
281+
282+ // force enable
283+ const enabledArgs = parseArguments ( '1.0.0' , [
284+ 'node' ,
285+ 'main.js' ,
286+ '--performance-crux' ,
287+ ] ) ;
288+ assert . strictEqual ( enabledArgs . performanceCrux , true ) ;
289+
290+ const disabledArgs = parseArguments ( '1.0.0' , [
291+ 'node' ,
292+ 'main.js' ,
293+ '--no-performance-crux' ,
294+ ] ) ;
295+ assert . strictEqual ( disabledArgs . performanceCrux , false ) ;
296+ } ) ;
275297} ) ;
You can’t perform that action at this time.
0 commit comments