You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/core/src/analytics/__tests__/dispatch.test.ts
+6-8Lines changed: 6 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -99,30 +99,28 @@ describe('Dispatch', () => {
99
99
expect.anything()
100
100
)
101
101
})
102
-
// TODO: Weird and inconsistent behavior
103
-
it('should have bizarre and inconsistent timeout behavior where the delay is different based on whether timeout is explicitly set to 1000 or not',async()=>{
102
+
// TODO: Inconsistent behavior? This seems like a bug.
103
+
it('should have inconsistent timeout behavior where the delay is different based on whether timeout is explicitly set to 1000 or not',async()=>{
104
104
{
105
105
constTIMEOUT=1000
106
106
awaitdispatch({type: 'screen'},queue,emitter,{
107
107
callback: jest.fn(),
108
108
timeout: TIMEOUT,
109
109
})
110
110
const[,,delay]=invokeCallback.mock.calls[0]
111
-
// timeout = 1000, delay equals 998
112
-
expect(delay).toBeGreaterThan(990)
113
-
expect(delay).toBeLessThanOrEqual(1000)
111
+
expect(delay).toBeGreaterThan(990)// ???
112
+
expect(delay).toBeLessThanOrEqual(1000)// ???
114
113
}
115
114
{
116
-
// wtf
117
115
invokeCallback.mockReset()
118
116
constTIMEOUT=undefined// this defaults to 1000 in the invokeCallback function
0 commit comments