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

增加部分 new Date 测试示例

上级 40ac6ee5
......@@ -63,6 +63,20 @@ export function testDate() : Result {
expect(event2.toDateString()).toEqual("Thu Jan 09 2014");
// #endif
})
test('newDateTest', () => {
// #ifdef APP-ANDROID
console.log(new Date("2024/5/1").toString())
expect(new Date("2024/5/1").toString()).toEqual("Wed May 01 2024 00:00:00 GMT+0800");
expect(new Date("2024/5/1 10:00:00").toString()).toEqual("Wed May 01 2024 10:00:00 GMT+0800");
expect(new Date("2024-05-01 10:00:00").toString()).toEqual("Wed May 01 2024 10:00:00 GMT+0800");
expect(new Date("2024-05-01 11:00").toString()).toEqual("Wed May 01 2024 11:00:00 GMT+0800");
expect(new Date("2024/05/01 12:00").toString()).toEqual("Wed May 01 2024 12:00:00 GMT+0800");
expect(new Date("2024-5-1 10:00").toString()).toEqual("Wed May 01 2024 10:00:00 GMT+0800");
expect(new Date("2024/5/1 10:00").toString()).toEqual("Wed May 01 2024 10:00:00 GMT+0800");
// #endif
})
test('getDate', () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册