Skip to content

Commit 342538e

Browse files
committed
Fix tests
1 parent 2bf1510 commit 342538e

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

test/unit/util/time.test.js

+14-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,20 @@ describe('util', () => {
4040
})
4141

4242
describe('toIsoStripped', () => {
43-
it('return 20000101T000101001Z when given new Date(01/01/2000)', () => {
44-
expect(Time.toIsoStripped(dateTime)).toBe('20000101T000101001Z')
43+
it('returns a string with length 19', () => {
44+
expect(Time.toIsoStripped(dateTime).length).toBe(19)
45+
})
46+
47+
it('returns a string without any colons', () => {
48+
expect(Time.toIsoStripped(dateTime).includes(':')).toBeFalsy()
49+
})
50+
51+
it('returns a string without any underscores', () => {
52+
expect(Time.toIsoStripped(dateTime).includes('_')).toBeFalsy()
53+
})
54+
55+
it('returns a string without any dashes', () => {
56+
expect(Time.toIsoStripped(dateTime).includes('-')).toBeFalsy()
4557
})
4658
})
4759
})

0 commit comments

Comments
 (0)