Skip to content

Commit

Permalink
merge-upstream: Fix broken test
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Dec 25, 2023
1 parent ed487bd commit 051c310
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/unit/tw_util_async_limiter.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ test('Runs callback', async t => {

test('Errors', async t => {
t.plan(1);
const callback = () => Promise.reject(new Error('Error123!'));
const errorObject = new Error('Testing testing 123'); // want to get the same *exact* object back
const callback = () => Promise.reject(errorObject);
const limiter = new AsyncLimiter(callback, 10);
try {
await limiter.do();
} catch (e) {
t.equal(e, 'Error123!');
t.equal(e, errorObject);
}
t.end();
});
Expand Down

0 comments on commit 051c310

Please sign in to comment.