diff --git a/package.json b/package.json index bd9a4a9f3..cebe79e0d 100644 --- a/package.json +++ b/package.json @@ -30,16 +30,16 @@ "devDependencies": { "@babel/plugin-transform-modules-commonjs": "^7.27.1", "@babel/preset-env": "^7.27.2", - "@crowdin/crowdin-api-client": "^1.44.0", - "@rsdoctor/rspack-plugin": "^1.1.2", - "@rspack/cli": "^1.3.13", - "@rspack/core": "^1.3.13", - "@swc/core": "^1.11.29", + "@crowdin/crowdin-api-client": "^1.45.0", + "@rsdoctor/rspack-plugin": "^1.1.3", + "@rspack/cli": "^1.3.15", + "@rspack/core": "^1.3.15", + "@swc/core": "^1.12.1", "@swc/jest": "^0.2.38", "@types/chrome": "0.0.326", "@types/decompress": "^4.2.7", "@types/jest": "^29.5.14", - "@types/node": "^24.0.0", + "@types/node": "^24.0.1", "@types/punycode": "^2.1.4", "@vue/babel-plugin-jsx": "^1.4.0", "babel-loader": "^10.0.0", @@ -47,14 +47,14 @@ "css-loader": "^7.1.2", "decompress": "^4.2.1", "husky": "^9.1.7", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", + "jest": "^30.0.0", + "jest-environment-jsdom": "^30.0.0", "jest-junit": "^16.0.0", - "postcss": "^8.5.4", + "postcss": "^8.5.5", "postcss-loader": "^8.1.1", "postcss-rtlcss": "^5.7.1", - "puppeteer": "^24.10.0", - "sass": "^1.89.1", + "puppeteer": "^24.10.1", + "sass": "^1.89.2", "sass-loader": "^16.0.5", "style-loader": "^4.0.0", "ts-loader": "^9.5.2", diff --git a/test/common/logger.test.ts b/test/common/logger.test.ts index 0a1ed2241..3c7da6182 100644 --- a/test/common/logger.test.ts +++ b/test/common/logger.test.ts @@ -5,18 +5,18 @@ * https://opensource.org/licenses/MIT */ -import { openLog, log, closeLog } from "@src/common/logger" +import { closeLog, log, openLog } from "@src/common/logger" test('test open log', () => { global.console.log = jest.fn() openLog() log("foobar") - expect(console.log).toBeCalledWith("foobar") + expect(console.log).toHaveBeenCalledWith("foobar") }) test('test close log', () => { global.console.log = jest.fn() closeLog() log("foobar") - expect(console.log).toBeCalledTimes(0) + expect(console.log).toHaveBeenCalledTimes(0) }) \ No newline at end of file diff --git a/test/util/limit.test.ts b/test/util/limit.test.ts index c960b7248..d50d69aba 100644 --- a/test/util/limit.test.ts +++ b/test/util/limit.test.ts @@ -52,17 +52,11 @@ describe('util/limit', () => { }) test('isEffective', () => { - const rule = (weekdays?: number[]): timer.limit.Rule => ({ - id: 1, name: 'foobar', - cond: [], - time: 0, weekdays, - enabled: true, allowDelay: false, locked: false, - }) expect(isEffective(undefined)).toBe(true) expect(isEffective([])).toBe(true) Object.defineProperty(global, 'performance', { writable: true }) - jest.useFakeTimers() + jest.useFakeTimers({ doNotFake: ['performance'] }) const monday = new Date() monday.setFullYear(2025) monday.setMonth(0) @@ -75,7 +69,7 @@ describe('util/limit', () => { test('isEffectiveAndEnabled', () => { Object.defineProperty(global, 'performance', { writable: true }) - jest.useFakeTimers() + jest.useFakeTimers({ doNotFake: ['performance'] }) const monday = new Date() monday.setFullYear(2025) monday.setMonth(0)