diff --git a/uni_modules/uts-tests/utssdk/Date.uts b/uni_modules/uts-tests/utssdk/Date.uts index 346566128040fb53423bf161351971107062196b..8fac465f9a24da3e21c9f6f157ee445ae2a2e950 100644 --- a/uni_modules/uts-tests/utssdk/Date.uts +++ b/uni_modules/uts-tests/utssdk/Date.uts @@ -10,6 +10,12 @@ export function testDate() : Result { expect(secondsElapsed).toEqual(2); }, 2000) }) + test('valueOf', () => { + const date1 = new Date('December 17, 1995 03:24:00'); + expect(date1.valueOf()).toEqual(819141840000); + const date2 = new Date('1995-12-17T03:24:00'); + expect(date2.valueOf()).toEqual(819141840000); + }) test('getDate', () => { const birthday = new Date('August 19, 1975 23:15:30'); const date1 = birthday.getDate();