1
0
forked from rosa/hakurei

4 Commits

View File

@@ -2,8 +2,8 @@
// DSL // DSL
type TestTree = TestGroup | Test; type TestTree = TestGroup | Test;
type TestGroup = { name: string, children: TestTree[] }; type TestGroup = { name: string; children: TestTree[] };
type Test = { name: string, test: (t: TestController) => void }; type Test = { name: string; test: (t: TestController) => void };
export class TestRegistrar { export class TestRegistrar {
#suites: TestGroup[]; #suites: TestGroup[];
@@ -13,7 +13,7 @@ export class TestRegistrar {
} }
suite(name: string, children: TestTree[]) { suite(name: string, children: TestTree[]) {
checkDuplicates(name, children) checkDuplicates(name, children);
this.#suites.push({ name, children }); this.#suites.push({ name, children });
} }
@@ -230,8 +230,8 @@ export class StreamReporter implements Reporter {
this.#displaySection("skips", this.#skips); this.#displaySection("skips", this.#skips);
this.stream.writeln(""); this.stream.writeln("");
this.stream.writeln( this.stream.writeln(
`${this.#successes.length} succeeded, ${this.#failures.length} failed` `${this.#successes.length} succeeded, ${this.#failures.length} failed` +
+ (this.#skips.length ? `, ${this.#skips.length} skipped` : "") (this.#skips.length ? `, ${this.#skips.length} skipped` : "")
); );
} }