forked from rosa/hakurei
Compare commits
3 Commits
2762e26718
...
a3d0a4776c
| Author | SHA1 | Date | |
|---|---|---|---|
|
a3d0a4776c
|
|||
|
f92385e9b0
|
|||
|
b039fd4203
|
@@ -7,12 +7,12 @@ export interface TestResult {
|
||||
// Reporting
|
||||
|
||||
export interface Reporter {
|
||||
update(path: string[], result: TestResult): void;
|
||||
finalize(): void;
|
||||
update(path: string[], result: TestResult);
|
||||
finalize();
|
||||
}
|
||||
|
||||
export interface Stream {
|
||||
writeln(s: string): void;
|
||||
writeln(s: string);
|
||||
}
|
||||
|
||||
export class StreamReporter implements Reporter {
|
||||
@@ -29,7 +29,6 @@ export class StreamReporter implements Reporter {
|
||||
}
|
||||
|
||||
update(path: string[], result: TestResult) {
|
||||
if (path.length === 0) throw new RangeError("path is empty");
|
||||
const pathStr = path.join(' ❯ ');
|
||||
if (result.success) {
|
||||
this.counts.successes++;
|
||||
@@ -78,7 +77,6 @@ export class StreamReporter implements Reporter {
|
||||
|
||||
export class DOMReporter implements Reporter {
|
||||
update(path: string[], result: TestResult) {
|
||||
if (path.length === 0) throw new RangeError("path is empty");
|
||||
const counter = document.getElementById(result.success ? 'successes' : 'failures');
|
||||
counter.innerText = (Number(counter.innerText) + 1).toString();
|
||||
let parent = document.getElementById('root');
|
||||
|
||||
Reference in New Issue
Block a user