Skip to content

Commit fedae35

Browse files
authored
fix: make mock-agent.js test more resilient (#2780)
1 parent d4ce0b1 commit fedae35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/mock-agent.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -789,7 +789,7 @@ test('MockAgent - handle delays to simulate work', async (t) => {
789789

790790
const response = await getResponse(body)
791791
t.strictEqual(response, 'hello')
792-
const elapsedInMs = process.hrtime(start)[1] / 1e6
792+
const elapsedInMs = Math.ceil(process.hrtime(start)[1] / 1e6)
793793
t.ok(elapsedInMs >= 50, `Elapsed time is not greater than 50ms: ${elapsedInMs}`)
794794
})
795795

0 commit comments

Comments
 (0)