diff options
Diffstat (limited to 'cli/js/testing.ts')
-rw-r--r-- | cli/js/testing.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cli/js/testing.ts b/cli/js/testing.ts index d38c5427d..accbb81ee 100644 --- a/cli/js/testing.ts +++ b/cli/js/testing.ts @@ -52,7 +52,7 @@ After: - completed: ${post.opsCompletedAsync} Make sure to await all promises returned from Deno APIs before -finishing test case.` +finishing test case.`, ); }; } @@ -61,7 +61,7 @@ finishing test case.` // the test case does not "leak" resources - ie. resource table after // the test has exactly the same contents as before the test. function assertResources( - fn: () => void | Promise<void> + fn: () => void | Promise<void>, ): () => void | Promise<void> { return async function resourceSanitizer(): Promise<void> { const pre = resources(); @@ -97,7 +97,7 @@ export function test(name: string, fn: () => void | Promise<void>): void; // creates a new object with "name" and "fn" fields. export function test( t: string | TestDefinition, - fn?: () => void | Promise<void> + fn?: () => void | Promise<void>, ): void { let testDef: TestDefinition; const defaults = { @@ -220,7 +220,7 @@ function reportToConsole(message: TestMessage): void { `${message.end.passed} passed; ${message.end.failed} failed; ` + `${message.end.ignored} ignored; ${message.end.measured} measured; ` + `${message.end.filtered} filtered out ` + - `${formatDuration(message.end.duration)}\n` + `${formatDuration(message.end.duration)}\n`, ); if (message.end.usedOnly && message.end.failed == 0) { @@ -247,7 +247,7 @@ class TestRunner { constructor( tests: TestDefinition[], public filterFn: (def: TestDefinition) => boolean, - public failFast: boolean + public failFast: boolean, ) { const onlyTests = tests.filter(({ only }) => only); this.#usedOnly = onlyTests.length > 0; @@ -300,7 +300,7 @@ class TestRunner { function createFilterFn( filter: undefined | string | RegExp, - skip: undefined | string | RegExp + skip: undefined | string | RegExp, ): (def: TestDefinition) => boolean { return (def: TestDefinition): boolean => { let passes = true; |