From 59732a90a0a2acfad78bbf0af63e049e59cc6683 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Fri, 8 Jul 2022 14:42:52 +0200 Subject: [PATCH] Meta tweaks --- .github/funding.yml | 4 ++++ .github/security.md | 3 +++ test.js | 6 +++--- 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .github/funding.yml create mode 100644 .github/security.md diff --git a/.github/funding.yml b/.github/funding.yml new file mode 100644 index 0000000..bf0d9e0 --- /dev/null +++ b/.github/funding.yml @@ -0,0 +1,4 @@ +github: sindresorhus +open_collective: sindresorhus +tidelift: npm/p-throttle +custom: https://sindresorhus.com/donate diff --git a/.github/security.md b/.github/security.md new file mode 100644 index 0000000..5358dc5 --- /dev/null +++ b/.github/security.md @@ -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. diff --git a/test.js b/test.js index 960a0a7..e2ee356 100644 --- a/test.js +++ b/test.js @@ -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'); } } });