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

增加跨文件引入UTSJSONObject 的示例

上级 d4083f26
......@@ -223,7 +223,7 @@ export function testNumber() : Result {
expect((new UTSNumber(0.000001)).toString()).toEqual("0.000001");
expect((new UTSNumber(0.0000001)).toString()).toEqual("1e-7");
expect((new UTSNumber(100000000000000000000.0)).toString()).toEqual("100000000000000000000");
expect((new UTSNumber(1000000000000000000000.0)).toString()).toEqual("1e21");
expect((new UTSNumber(1000000000000000000000.0)).toString()).toEqual("1e+21");
// #endif
})
......
import { describe, test, expect, expectNumber, Result } from './tests.uts'
import {mockData} from './data.uts'
export function testUTSJSONObject() : Result {
......@@ -10,7 +10,8 @@ export function testUTSJSONObject() : Result {
age:11
}
expect(UTSJSONObject.keys(obj).length).toEqual(2);
console.log(UTSJSONObject.keys(obj))
expect(UTSJSONObject.keys(mockData).length).toEqual(2);
})
test('toJSONObject', () => {
......
const mockData = {
username:"lucy",
age:12
}
export {mockData}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册