diff --git a/uni_modules/uts-tests/utssdk/console.uts b/uni_modules/uts-tests/utssdk/console.uts index d13755f5b53eb6c1785fc9dc845c7195d8cc62ad..3d8c881e3d655d1d5cbfc8ac61a7f33de0ce9b1f 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 } )