forked from rosa/hakurei
cmd/pkgserver: set exit code when running JS tests from CLI
This commit is contained in:
@@ -43,4 +43,6 @@ if (args.length === 1) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TESTS.run(new StreamReporter({ writeln: console.log }, verbose));
|
let reporter = new StreamReporter({ writeln: console.log }, verbose);
|
||||||
|
TESTS.run(reporter);
|
||||||
|
exit(reporter.succeeded() ? 0 : 1);
|
||||||
|
|||||||
@@ -198,6 +198,10 @@ export class StreamReporter implements Reporter {
|
|||||||
this.#skips = [];
|
this.#skips = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
succeeded(): boolean {
|
||||||
|
return this.#successes.length > 0 && this.#failures.length === 0;
|
||||||
|
}
|
||||||
|
|
||||||
register(suites: TestGroup[]) {}
|
register(suites: TestGroup[]) {}
|
||||||
|
|
||||||
update(path: string[], result: TestResult) {
|
update(path: string[], result: TestResult) {
|
||||||
|
|||||||
Reference in New Issue
Block a user