Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: test runner #516

Merged
merged 20 commits into from
Aug 15, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add TODOs regarding return types
bartlomieju committed Aug 14, 2019
commit b33d282702bc8677f4be741ee73df00a3f38a4f5
1 change: 1 addition & 0 deletions testing/mod.ts
Original file line number Diff line number Diff line change
@@ -300,6 +300,7 @@ export interface RunOptions {
* Runs specified test cases.
* Parallel execution can be enabled via the boolean option; default: serial.
*/
// TODO: change return type to `Promise<boolean>` - ie. don't exit but return value
export async function runTests({
parallel = false,
exitOnFail = false,
2 changes: 2 additions & 0 deletions testing/runner.ts
Original file line number Diff line number Diff line change
@@ -41,6 +41,8 @@ function filePathToRegExp(str: string): RegExp {
return RegExp(str);
}

// TODO: change return type to `Promise<void>` once, `runTests` is updated
// to return boolean instead of exiting
export async function main(root: string = cwd()): Promise<void> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Describe the glob behavior in a jsdoc comment

const parsedArgs = parse(args.slice(1), {
boolean: ["quiet", "failfast", "help"],