summaryrefslogtreecommitdiff
path: root/cli/js/testing.ts
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2020-07-14 15:24:17 -0400
committerGitHub <noreply@github.com>2020-07-14 15:24:17 -0400
commitcde4dbb35132848ffece59ef9cfaccff32347124 (patch)
treecc7830968c6decde704c8cfb83c9185193dc698f /cli/js/testing.ts
parent9eca71caa1674c31f9cc5d4e86c03f10b59e0a00 (diff)
Use dprint for internal formatting (#6682)
Diffstat (limited to 'cli/js/testing.ts')
-rw-r--r--cli/js/testing.ts12
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;