diff --git a/uni_modules/uts-tests/utssdk/tests.uts b/uni_modules/uts-tests/utssdk/tests.uts index 953d7217774a4b5c108e8ee75b36265409580737..27b1136983c3cdf2244c731128b2d7e98b0e48f3 100644 --- a/uni_modules/uts-tests/utssdk/tests.uts +++ b/uni_modules/uts-tests/utssdk/tests.uts @@ -2,10 +2,19 @@ import { Matchers,NumberMatchers } from './Matchers.uts' export const describes = new Map() -export class Result { +export class Result implements io.dcloud.uts.json.IJsonStringify { total = 0 passed: string[] = [] failed: string[] = [] + + override toJSON():any|null{ + let jsonRet = { + 'total': this.total, + 'passed': JSON.stringify(this.passed), + 'failed': JSON.stringify(this.failed), + } + return jsonRet + } } let result: Result = new Result()