Skip to content

Commit

Permalink
upgrade jest
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiyelee committed Feb 20, 2024
1 parent b344eb7 commit c6d59bd
Show file tree
Hide file tree
Showing 4 changed files with 1,561 additions and 1,673 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
coverage
debug.local.js
logs
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
"@vercel/ncc": "^0.27.0",
"babel-jest": "^26.6.3",
"eslint": "^8.5.0",
"jest": "^26.6.3"
"jest": "^29.7.0"
}
}
4 changes: 2 additions & 2 deletions src/lib/util.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ describe('wait()', () => {
const fn = jest.fn();
utils.wait(100).then(fn);

jest.runTimersToTime(50);
jest.advanceTimersByTime(50);
await Promise.resolve();
expect(fn).not.toHaveBeenCalled();

jest.runTimersToTime(50);
jest.advanceTimersByTime(50);
await Promise.resolve();
expect(fn).toHaveBeenCalledTimes(1);
});
Expand Down
Loading

0 comments on commit c6d59bd

Please sign in to comment.