提交 6bfb1be5 编写于 作者: 雪洛's avatar 雪洛

test: web端支持Object.keys测试例

上级 01f31e15
...@@ -5,14 +5,12 @@ import { describe, test, expect, expectNumber, Result } from './tests.uts' ...@@ -5,14 +5,12 @@ import { describe, test, expect, expectNumber, Result } from './tests.uts'
export function testUTSJSONObject() : Result { export function testUTSJSONObject() : Result {
return describe("utsjsonobject", () => { return describe("utsjsonobject", () => {
test('keys', () => { test('keys', () => {
// #ifdef APP-ANDROID
let obj = { let obj = {
name:"zhangsan", name:"zhangsan",
age:11 age:11
} }
expect(UTSJSONObject.keys(obj).size).toEqual(2); expect(UTSJSONObject.keys(obj).length).toEqual(2);
console.log(UTSJSONObject.keys(obj)) console.log(UTSJSONObject.keys(obj))
// #endif
}) })
test('assign-notype', () => { test('assign-notype', () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册