Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jokester committed Apr 20, 2024
1 parent 94dc64b commit f77d2ba
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/concurrency/resource-pool.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe(ResourcePool.name, () => {
testee.use(() => wait(0.5e3));
const becameEmpty = await testee.wait({ freeCount: 2 });
expect(becameEmpty).toBeTruthy();
expect(Date.now() - start).toBeGreaterThan(0.5e3);
expect(Date.now() - start).toBeGreaterThanOrEqual(0.5e3);
});

it('returns false when other tasks running', async () => {
Expand Down
12 changes: 0 additions & 12 deletions src/stress/orderBy.spec.ts

This file was deleted.

12 changes: 12 additions & 0 deletions src/stress/sortBy.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { sortBy } from './sortBy';

describe('orderBy', () => {
it('sorts value DESC by "natural" JS ordering', () => {
expect(sortBy([2, 3, 1], (v) => v, false)).toEqual([3, 2, 1]);
expect(sortBy([1, 1, 2], (v) => v, false)).toEqual([2, 1, 1]);
});
it('sorts value ASC by "natural" JS ordering', () => {
expect(sortBy([2, 3, 1], (v) => v)).toEqual([1, 2, 3]);
expect(sortBy([1, 1, 2], (v) => v)).toEqual([1, 1, 2]);
});
});

0 comments on commit f77d2ba

Please sign in to comment.