Skip to content
Prev Previous commit
Next Next commit
test: replace lolex with @sinonjs/fake-timers
  • Loading branch information
wolfy1339 committed Feb 23, 2024
commit d7387e132d8c7e14347539be3abcfa45fcc15dfd
51 changes: 33 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@
"@types/lolex": "^5.1.0",
"@types/node": "^20.0.0",
"@types/once": "^1.4.0",
"@types/sinonjs__fake-timers": "^8.1.5",
"@sinonjs/fake-timers": "^11.2.2",
"esbuild": "^0.20.0",
"fetch-mock": "npm:@gr2m/fetch-mock@^9.11.0-pull-request-644.1",
"glob": "^10.2.4",
"jest": "^29.0.0",
"lolex": "^6.0.0",
"prettier": "3.2.5",
"semantic-release-plugin-update-version-in-files": "^1.0.0",
"ts-jest": "^29.0.0",
Expand Down Expand Up @@ -70,6 +71,7 @@
"modulePathIgnorePatterns": [
"<rootDir>/pkg"
],
"testEnvironment": "node",
"moduleNameMapper": {
"^(.+)\\.jsx?$": "$1"
}
Expand Down
4 changes: 2 additions & 2 deletions test/request.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ReadableStream } from "node:stream/web";
import { getUserAgent } from "universal-user-agent";
import fetchMock from "fetch-mock";
import { createAppAuth } from "@octokit/auth-app";
import lolex from "lolex";
import fakeTimers from "@sinonjs/fake-timers";
import type {
EndpointOptions,
RequestInterface,
Expand Down Expand Up @@ -73,7 +73,7 @@ describe("request()", () => {
});

it("README authentication example", async () => {
const clock = lolex.install({
const clock = fakeTimers.install({
now: 0,
toFake: ["Date"],
});
Expand Down