Skip to content

Commit

Permalink
updating eslint and prettier to latest (#635)
Browse files Browse the repository at this point in the history
* updating eslint and prettier to latest

* fixing the sleep and wait
  • Loading branch information
jaredwray authored Jan 19, 2024
1 parent e7ecafe commit 2f6d831
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@
"@faker-js/faker": "8.3.1",
"@types/lodash.clonedeep": "4.5.9",
"@types/node": "20.11.5",
"@typescript-eslint/eslint-plugin": "6.15.0",
"@typescript-eslint/parser": "6.15.0",
"@typescript-eslint/eslint-plugin": "6.19.0",
"@typescript-eslint/parser": "6.19.0",
"@vitest/coverage-v8": "1.2.1",
"dotenv-cli": "7.3.0",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-prettier": "5.1.3",
"lint-staged": "15.2.0",
"prettier": "3.1.1",
"prettier": "3.2.4",
"rimraf": "^5.0.5",
"typescript": "5.3.3",
"vitest": "1.2.1"
Expand Down
4 changes: 2 additions & 2 deletions test/caching.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,13 @@ describe('caching', () => {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const sec = faker.number.int({ min: 2, max: 4 });
value = faker.string.sample(sec * 2);
const fn = vi.fn((v: string) => (v.length / 2) * 1000);
const fn = vi.fn((v: string) => 1000);
await cache.wrap(key, async () => value, fn);
await expect(cache.get(key)).resolves.toEqual(value);
await expect(cache.wrap(key, async () => 'foo')).resolves.toEqual(value);

expect(fn).toHaveBeenCalledTimes(1);
await sleep(sec * 1000);
await sleep(2000);
await expect(cache.get(key)).resolves.toBeUndefined();
});

Expand Down

0 comments on commit 2f6d831

Please sign in to comment.