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
Prev Previous commit
Next Next commit
lint
  • Loading branch information
bartlomieju committed Aug 14, 2019
commit 751440b00ed190835e35626190daa69627e2c2e7
6 changes: 4 additions & 2 deletions testing/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const { args, cwd } = Deno;
const DEFAULT_GLOBS = ["**/*_test.ts", "**/*_test.js"];

// TODO: upgrade it
function showHelp() {
/* eslint-disable max-len */
function showHelp(): void {
console.log(`deno test-runner
Test runner

Expand All @@ -22,6 +23,7 @@ OPTIONS:
-g, --glob <PATH...> List of globs for test files, defaults to: **/*_test.ts,**/*_test.js
`);
}
/* eslint-enable max-len */

async function main(): Promise<void> {
const parsedArgs = parse(args.slice(1), {
Expand Down Expand Up @@ -50,7 +52,7 @@ async function main(): Promise<void> {
match: fileGlobs.map(glob)
});

const foundTestFiles: Array<string> = [];
const foundTestFiles: string[] = [];
for await (const { filename } of filesIterator) {
foundTestFiles.push(filename);
}
Expand Down