Skip to content

Commit

Permalink
feat: default testlevel if tests are provided
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc committed Nov 13, 2023
1 parent 65a5dc2 commit 78101a9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/utils/flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ export const ensuredDirFlag = Flags.custom<string>({
export const testLevelFlag = Flags.custom<TestLevel>({
char: 'l',
parse: (input) => Promise.resolve(input as TestLevel),
// eslint-disable-next-line @typescript-eslint/require-await
default: async (context) => {
if (context.flags.tests) return TestLevel.RunSpecifiedTests;
},
default: async (context) => Promise.resolve(context.flags.tests ? TestLevel.RunSpecifiedTests : undefined),
options: Object.values(TestLevel),
});

Expand Down

0 comments on commit 78101a9

Please sign in to comment.