From 20885469814ac09fe67c95124ef7e9186daa235c Mon Sep 17 00:00:00 2001 From: duqingquan Date: Thu, 19 Sep 2024 19:12:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0Result=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=BA=8F=E5=88=97=E5=8C=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uts-tests/utssdk/tests.uts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/uni_modules/uts-tests/utssdk/tests.uts b/uni_modules/uts-tests/utssdk/tests.uts index 953d721..27b1136 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() -- GitLab