From ac1194fe2b32b5eefa3924e79065c3761a743d13 Mon Sep 17 00:00:00 2001 From: duqingquan Date: Thu, 30 May 2024 11:48:45 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E9=A1=B5=E9=9D=A2=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1=E6=89=93=E5=8D=B0=E6=B5=8B=E8=AF=95=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uts-tests/utssdk/console.uts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/uni_modules/uts-tests/utssdk/console.uts b/uni_modules/uts-tests/utssdk/console.uts index d13755f..3d8c881 100644 --- a/uni_modules/uts-tests/utssdk/console.uts +++ b/uni_modules/uts-tests/utssdk/console.uts @@ -1,6 +1,5 @@ import { describe, test, expect, expectNumber, Result } from './tests.uts' - function obtainInnerObject(obj:Any | null):UTSJSONObject{ let jsonStr = console.getLogV2(obj).slice(19,-17) let a = JSON.parseArray(jsonStr)![0] @@ -14,6 +13,13 @@ export function testConsole() : Result { expect(obtainInnerObject(0.9).get("type")).toEqual("Double"); expect(obtainInnerObject(0.9).get("subType")).toEqual("number"); expect(obtainInnerObject(0.9).get("value")).toEqual("0.9"); + + // #endif + + // #ifdef UNI-APP-X && APP-ANDROID + let pageInstance = new io.dcloud.uniapp.vue.ComponentInternalInstance() + expect(obtainInnerObject(pageInstance).get("className")).toEqual("io.dcloud.uniapp.vue.ComponentInternalInstance"); + expect(obtainInnerObject(pageInstance).get("type")).toEqual("object"); // #endif } ) -- GitLab