1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-07-29 16:24:36 +02:00
This commit is contained in:
kakkokari-gtyih
2025-12-04 10:05:17 +09:00
parent 20522d14be
commit ae07a4aae6
5 changed files with 12 additions and 4 deletions

View File

@@ -10,4 +10,3 @@ beforeAll(async () => {
await initTestDb(false);
await sendEnvResetRequest();
});

View File

@@ -3,8 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
module.exports = async () => {
import { beforeAll } from 'vitest';
beforeAll(() => {
// DBはUTCっぽいので、テスト側も合わせておく
process.env.TZ = 'UTC';
process.env.NODE_ENV = 'test';
};
});

View File

@@ -7,7 +7,7 @@ export default mergeConfig(
test: {
include: ['test/e2e/**/*.ts'],
globalSetup: './built-test/entry.js',
setupFiles: ['./test/setup.ts'],
setupFiles: ['./test/setup.e2e.ts'],
},
}),
);

View File

@@ -14,6 +14,12 @@ export const baseConfig = defineConfig({
include: ['src/**/*.ts'],
exclude: ['src/**/*.test.ts'],
},
restoreMocks: true,
testTimeout: 60000,
maxWorkers: 1,
logHeapUsage: true,
vmMemoryLimit: 1024,
maxConcurrency: 32,
},
resolve: {
alias: {

View File

@@ -5,6 +5,7 @@ export default mergeConfig(
baseConfig,
defineConfig({
test: {
globalSetup: './test/setup.unit.ts',
include: ['test/unit/**/*.ts', 'src/**/*.test.ts'],
},
}),