This is not GitHub.com

Like what you see? Install OctoLinker now!

Skip to content
Permalink
Browse files
Add code comment to tests
Fixes #41
  • Loading branch information
sindresorhus committed Jul 8, 2021
1 parent c9c0882 commit a6666d1a6f97602fd9aa0a176b580f3001a6e1c4
Showing with 2 additions and 0 deletions.
  1. +2 −0 test.js
@@ -43,6 +43,8 @@ const mapper = async ([value, ms]) => {
test('main', async t => {
const end = timeSpan();
t.deepEqual(await pMap(sharedInput, mapper), [10, 20, 30]);

// We give it some leeway on both sides of the expected 300ms as the exact value depends on the machine and workload.
t.true(inRange(end(), {start: 290, end: 430}));
});

0 comments on commit a6666d1

Please sign in to comment.