提交 ac1194fe 编写于 作者: 杜庆泉's avatar 杜庆泉

新增页面对象打印测试示例

上级 cb104091
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
}
)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册