提交 d3244390 编写于 作者: lizhongyi_'s avatar lizhongyi_

增加number测试用例

上级 b4b4bc52
......@@ -74,10 +74,10 @@
"uniStatistics": {
"enable": false
},
"vueVersion": "3",
"uni-app-x" : {
"uvue" : {
"flex-direction" : "cloum"
}
}
"vueVersion": "3"
// "uni-app-x" : {
// "uvue" : {
// "flex-direction" : "cloum"
// }
// }
}
\ No newline at end of file
......@@ -35,5 +35,21 @@ export function testNumber(): Result {
expect(1.23e5.toPrecision(4)).toEqual("1.230e+5");
})
test('toString', () => {
expect((10).toString()).toEqual("10");
expect((17).toString()).toEqual("17");
expect((17.2).toString()).toEqual("17.2");
expect((6).toString(2)).toEqual("110");
expect((254).toString(16)).toEqual("fe");
expect((-10).toString(2)).toEqual("-1010");
expect((-0xff).toString(2)).toEqual("-11111111");
})
test('valueOf', () => {
expect((10).valueOf()).toEqual(10);
expect((-10.2).valueOf()).toEqual(-10.2);
expect((0xf).valueOf()).toEqual(15);
})
})
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册