Skip to content

Commit 42166c2

Browse files
committed
fix (clock): fix test issue with local time with the clock example, make it use utc time instead
1 parent 0b2e359 commit 42166c2

File tree

7 files changed

+4655
-2946
lines changed

7 files changed

+4655
-2946
lines changed

__tests__/Clock.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import sinon from 'sinon'
55
import App from '../examples/clock/App'
66

77
describe('Clock App', () => {
8-
const clock = sinon.useFakeTimers(0)
8+
const clock = sinon.useFakeTimers()
99
const app = mount(<App />)
1010
const clearIntervalSpy = sinon.spy(global, 'clearInterval')
1111

__tests__/__snapshots__/Clock.test.js.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,41 @@
33
exports[`01. Initial state 1`] = `
44
<EasyCompWrapper>
55
<div>
6-
01:00:00 AM
6+
12:00:00 AM
77
</div>
88
</EasyCompWrapper>
99
------------HTML PREVIEW---------------
1010
<EasyCompWrapper>
1111
<div>
12-
01:00:00 AM
12+
12:00:00 AM
1313
</div>
1414
</EasyCompWrapper>
1515
`;
1616

1717
exports[`02. After 2 seconds 1`] = `
1818
<EasyCompWrapper>
1919
<div>
20-
01:00:02 AM
20+
12:00:02 AM
2121
</div>
2222
</EasyCompWrapper>
2323
------------HTML PREVIEW---------------
2424
<EasyCompWrapper>
2525
<div>
26-
01:00:02 AM
26+
12:00:02 AM
2727
</div>
2828
</EasyCompWrapper>
2929
`;
3030

3131
exports[`03. After 10.5 seconds 1`] = `
3232
<EasyCompWrapper>
3333
<div>
34-
01:00:10 AM
34+
12:00:10 AM
3535
</div>
3636
</EasyCompWrapper>
3737
------------HTML PREVIEW---------------
3838
<EasyCompWrapper>
3939
<div>
40-
01:00:10 AM
40+
12:00:10 AM
4141
</div>
4242
</EasyCompWrapper>
4343
`;

0 commit comments

Comments
 (0)