Skip to content

Commit

Permalink
test(command,flags): don't call Deno.runTests() in test's
Browse files Browse the repository at this point in the history
  • Loading branch information
c4spar committed Apr 4, 2020
1 parent 2b51730 commit 57f3a34
Show file tree
Hide file tree
Showing 26 changed files with 0 additions and 52 deletions.
2 changes: 0 additions & 2 deletions packages/command/test/command/allow-empty_test.ts
Expand Up @@ -38,5 +38,3 @@ Deno.test( async function flags_allowEmpty_disabled() {
await cmd.parse( [] );
}, Error, 'No arguments.' );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/command/test/command/sub-command_test.ts
Expand Up @@ -84,5 +84,3 @@ Deno.test( async function command_subCommand3_typeString_flagMissing() {
await command().parse( [ 'sub-command2', 'sub-command3', 'input-path' ] );
}, Error, 'Missing argument: output' );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/command/test/option/action_test.ts
Expand Up @@ -23,5 +23,3 @@ Deno.test( async function command_optionAction_action() {
assertEquals( actionArgs, [ 'arg' ] );
assertEquals( args, [ 'arg' ] );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/command/test/option/aliases_test.ts
Expand Up @@ -65,5 +65,3 @@ Deno.test( async function command_optionAliases_flagsInvalidValue() {
await cmd.parse( [ '--flags', 'value' ] );
}, Error, 'Option --flag must be of type boolean but got: value' );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/command/test/option/conflicts_test.ts
Expand Up @@ -54,5 +54,3 @@ Deno.test( async function command_optionConflicts_videoAudioImageType() {
await cmd.parse( [ '-v', 'value', '-a', 'value' ] );
}, Error, 'Option --video-type depends on option: --image-type' );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/command/test/option/duplicate_test.ts
Expand Up @@ -40,5 +40,3 @@ Deno.test( async function command_optionDuplicate_flagTrueNoFlagTrue() {
await cmd.parse( [ '-f', 'true', '--no-flag', 'true' ] );
}, Error, 'Duplicate option: --no-flag' );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/command/test/option/required_test.ts
Expand Up @@ -21,5 +21,3 @@ Deno.test( async function command_optionRequired_noArguments() {
await cmd.parse( [] );
}, Error, 'Missing required option: --flag' );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/command/test/option/requires_test.ts
Expand Up @@ -65,5 +65,3 @@ Deno.test( async function command_optionRequire_imageVideo() {
await cmd.parse( [ '-i', 'value', '-v', 'value' ] );
}, Error, 'Option --image-type depends on option: --audio-type' );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/command/test/option/standalone_test.ts
Expand Up @@ -28,5 +28,3 @@ Deno.test( async function command_optionStandalone_flagCombineLong() {
await cmd.parse( [ '--flag', '--all' ] );
}, Error, 'Option --flag cannot be combined with other options' );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/command/test/option/variadic_test.ts
Expand Up @@ -103,5 +103,3 @@ Deno.test( async function command_optionVariadic_exactLastOptionalVariadic() {
assertEquals( options, { variadicOption: [ 1, 'abc', true, false, true, false ] } );
assertEquals( args, [] );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/command/test/type/boolean_test.ts
Expand Up @@ -107,5 +107,3 @@ Deno.test( async function command_optionStandalone_flagCombineLong() {
await cmd.parse( [ '-f', 'unknown' ] );
}, Error, 'Option --flag must be of type boolean but got: unknown' );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/command/test/type/number_test.ts
Expand Up @@ -34,5 +34,3 @@ Deno.test( async function command_optionStandalone_flagCombineLong() {
await cmd.parse( [ '-f', 'abc' ] );
}, Error, 'Option --flag must be of type number but got: abc' );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/command/test/type/string_test.ts
Expand Up @@ -27,5 +27,3 @@ Deno.test( async function command_optionStandalone_flagCombineLong() {
await cmd.parse( [ '-f', 'value', 'unknown' ] );
}, Error, 'Unknown command: unknown' );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/flags/test/option/aliases_test.ts
Expand Up @@ -85,5 +85,3 @@ Deno.test( function flags_optionAliases_InvalidValue_flags() {
'Option --flag must be of type boolean but got: value'
);
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/flags/test/option/collect_test.ts
Expand Up @@ -98,5 +98,3 @@ Deno.test( function flags_optionCollect_number() {
assertEquals( unknown, [] );
assertEquals( literal, [] );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/flags/test/option/conflicts_test.ts
Expand Up @@ -70,5 +70,3 @@ Deno.test( function flags_optionConflicts_videoTypeDependsOnImageType() {
'Option --video-type depends on option: --image-type'
);
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/flags/test/option/default_test.ts
Expand Up @@ -59,5 +59,3 @@ Deno.test( function flags_optionDefault_defaultValues() {
assertEquals( unknown, [] );
assertEquals( literal, [] );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/flags/test/option/required_test.ts
Expand Up @@ -29,5 +29,3 @@ Deno.test( function flags_optionRequired_noArguments() {
'Missing required option: --flag'
);
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/flags/test/option/requires_test.ts
Expand Up @@ -94,5 +94,3 @@ Deno.test( function flags_optionRequire_imageVideo() {
'Option --image-type depends on option: --audio-type'
);
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/flags/test/option/standalone_test.ts
Expand Up @@ -44,5 +44,3 @@ Deno.test( function flags_optionStandalone_flagCombineLong() {
'Option --flag cannot be combined with other options.'
);
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/flags/test/option/value_test.ts
Expand Up @@ -25,5 +25,3 @@ Deno.test( function flags_optionVariadic_optional() {
assertEquals( unknown, [] );
assertEquals( literal, [] );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/flags/test/option/variadic_test.ts
Expand Up @@ -150,5 +150,3 @@ Deno.test( function flags_optionVariadic_exactLastOptionalVariadic() {
assertEquals( unknown, [] );
assertEquals( literal, [] );
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/flags/test/setting/allow-empty_test.ts
Expand Up @@ -42,5 +42,3 @@ Deno.test( function flags_allowEmpty_disabled() {
'No arguments.'
);
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/flags/test/type/boolean_test.ts
Expand Up @@ -121,5 +121,3 @@ Deno.test( function flags_typeBoolean_flagInvalidType() {
'Option --flag must be of type boolean but got: unknown'
);
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/flags/test/type/number_test.ts
Expand Up @@ -68,5 +68,3 @@ Deno.test( function flags_typeNumber_flagInvalidType() {
'Option --flag must be of type number but got: abc'
);
} );

await Deno.runTests();
2 changes: 0 additions & 2 deletions packages/flags/test/type/string_test.ts
Expand Up @@ -59,5 +59,3 @@ Deno.test( function flags_typeString_flagMissing() {
'Missing value for option: --flag'
);
} );

await Deno.runTests();

0 comments on commit 57f3a34

Please sign in to comment.