forked from rosa/hakurei
cmd/pkgserver: serialize JS enums as ints instead of strings
This commit is contained in:
@@ -352,7 +352,13 @@ export class GoTestReporter implements Reporter {
|
||||
}
|
||||
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user