Skip to content

Commit

Permalink
fix: make mock-agent.js test more resilient (nodejs#2780)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak committed Feb 19, 2024
1 parent 4ca5ea9 commit 20694ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/mock-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -789,7 +789,7 @@ test('MockAgent - handle delays to simulate work', async (t) => {

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

Expand Down

0 comments on commit 20694ec

Please sign in to comment.