forked from rosa/hakurei
cmd/pkgserver: serialize JS enums as ints instead of strings
This commit is contained in:
@@ -379,7 +379,13 @@ export class GoTestReporter implements Reporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
update(path: string[], result: TestResult) {
|
update(path: string[], result: TestResult) {
|
||||||
console.log(JSON.stringify({ path: path, ...result }));
|
let state: number;
|
||||||
|
switch (result.state) {
|
||||||
|
case "success": state = 0; break;
|
||||||
|
case "failure": state = 1; break;
|
||||||
|
case "skip": state = 2; break;
|
||||||
|
}
|
||||||
|
console.log(JSON.stringify({ path: path, state, logs: result.logs }));
|
||||||
}
|
}
|
||||||
|
|
||||||
finalize() {
|
finalize() {
|
||||||
|
|||||||
Reference in New Issue
Block a user