Skip to content

Commit

Permalink
Meta tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jul 8, 2022
1 parent 2969d40 commit 59732a9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/funding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
github: sindresorhus
open_collective: sindresorhus
tidelift: npm/p-throttle
custom: https://sindresorhus.com/donate
3 changes: 3 additions & 0 deletions .github/security.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Security Policy

To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure.
6 changes: 3 additions & 3 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ test('limits after pause in strict mode', async t => {
for (const [index, executed] of results.entries()) {
const elapsed = executed - start;
if (index < limit - 1) {
t.true(inRange(elapsed, {start: pause, end: pause + 15}), 'Executed immediately after the pause');
t.true(inRange(elapsed, {start: pause, end: pause + 50}), 'Executed immediately after the pause');
} else if (index === limit - 1) {
t.true(inRange(elapsed, {start: interval, end: interval + 15}), 'Executed after the interval');
t.true(inRange(elapsed, {start: interval, end: interval + 50}), 'Executed after the interval');
} else {
const difference = executed - results[index - limit];
t.true(inRange(difference, {start: interval - 10, end: interval + 15}), 'Waited the interval');
t.true(inRange(difference, {start: interval - 10, end: interval + 50}), 'Waited the interval');
}
}
});
Expand Down

0 comments on commit 59732a9

Please sign in to comment.