Skip to content

Commit

Permalink
feat(command): add options for test command
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Sep 5, 2023
1 parent d00f45d commit 2ae1556
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/core",
"version": "4.6.0",
"version": "4.7.0",
"description": "The plug and play Node.js framework.",
"license": "MIT",
"author": "João Lenon <lenon@athenna.io>",
Expand Down
17 changes: 16 additions & 1 deletion src/commands/TestCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,22 @@ export class TestCommand extends BaseCommand {
}

public static commander(commander: Commander) {
return commander.allowUnknownOption()
return commander
.allowUnknownOption()
.option(
'--tests',
'Specify test titles: --tests="shouldBeOk,shouldNotBeOk"',
)
.option(
'--groups',
'Specify group titles: --groups="AppControllerTest,AppServiceTest"',
)
.option(
'--files',
'Specify files to match and run: --files="AppControllerTest.ts,AppServiceTest.ts"',
)
.option('--force-exit', 'Enable/disable force exit')
.option('--timeout', 'Define timeout for all tests: --timeout 3000')
}

// TODO Verify if this command still makes sense to exist.
Expand Down

0 comments on commit 2ae1556

Please sign in to comment.