Compare commits

...

3 Commits

Author SHA1 Message Date
kakkokari-gtyih c306cdbdd9 attempt to fix test 2025-06-13 21:44:53 +09:00
kakkokari-gtyih 0770ee82eb attempt to fix test 2025-06-13 21:32:18 +09:00
kakkokari-gtyih a629985ef6 attempt to fix test 2025-06-13 21:23:49 +09:00
6 changed files with 21 additions and 7 deletions

View File

@ -136,7 +136,7 @@ module.exports = {
// runner: "jest-runner", // runner: "jest-runner",
// The paths to modules that run some code to configure or set up the testing environment before each test // The paths to modules that run some code to configure or set up the testing environment before each test
// setupFiles: [], setupFiles: ["<rootDir>/test/jest.setup.ts"],
// A list of paths to modules that run some code to configure or set up the testing framework before each test // A list of paths to modules that run some code to configure or set up the testing framework before each test
// setupFilesAfterEnv: [], // setupFilesAfterEnv: [],

View File

@ -8,7 +8,7 @@ const base = require('./jest.config.cjs')
module.exports = { module.exports = {
...base, ...base,
globalSetup: "<rootDir>/built-test/entry.js", globalSetup: "<rootDir>/built-test/entry.js",
setupFilesAfterEnv: ["<rootDir>/test/jest.setup.ts"], setupFilesAfterEnv: ["<rootDir>/test/jest.setup.e2e.ts"],
testMatch: [ testMatch: [
"<rootDir>/test/e2e/**/*.ts", "<rootDir>/test/e2e/**/*.ts",
], ],

View File

@ -236,6 +236,7 @@
"fkill": "9.0.0", "fkill": "9.0.0",
"jest": "30.0.0", "jest": "30.0.0",
"jest-mock": "30.0.0", "jest-mock": "30.0.0",
"jest-util": "30.0.0",
"nodemon": "3.1.10", "nodemon": "3.1.10",
"pid-port": "1.0.2", "pid-port": "1.0.2",
"simple-oauth2": "5.1.0", "simple-oauth2": "5.1.0",

View File

@ -0,0 +1,11 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project
* SPDX-License-Identifier: AGPL-3.0-only
*/
import { initTestDb, sendEnvResetRequest } from './utils.js';
beforeAll(async () => {
await initTestDb(false);
await sendEnvResetRequest();
});

View File

@ -3,9 +3,8 @@
* SPDX-License-Identifier: AGPL-3.0-only * SPDX-License-Identifier: AGPL-3.0-only
*/ */
import { initTestDb, sendEnvResetRequest } from './utils.js'; import { protectProperties } from 'jest-util';
beforeAll(async () => { protectProperties(globalThis.ReadableStreamDefaultReader);
await initTestDb(false); protectProperties(globalThis.ReadableStreamBYOBReader);
await sendEnvResetRequest(); protectProperties(globalThis.WritableStreamDefaultWriter);
});

View File

@ -589,6 +589,9 @@ importers:
jest-mock: jest-mock:
specifier: 30.0.0 specifier: 30.0.0
version: 30.0.0 version: 30.0.0
jest-util:
specifier: 30.0.0
version: 30.0.0
nodemon: nodemon:
specifier: 3.1.10 specifier: 3.1.10
version: 3.1.10 version: 3.1.10