forked from mirrors/misskey
attempt to fix test
This commit is contained in:
parent
fce5dfcfb0
commit
d7329c46f1
2 changed files with 18 additions and 1 deletions
17
packages/backend/test/global-setup.e2e.ts
Normal file
17
packages/backend/test/global-setup.e2e.ts
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
import { execaNode } from 'execa';
|
||||
|
||||
export default async function globalSetup() {
|
||||
// E2Eテスト用のサーバを起動する
|
||||
await execaNode('./built-test/entry.js', [], {
|
||||
stdout: process.stdout,
|
||||
stderr: process.stderr,
|
||||
env: {
|
||||
NODE_ENV: 'test',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ export default mergeConfig(
|
|||
defineConfig({
|
||||
test: {
|
||||
include: ['./test/e2e/**/*.ts'],
|
||||
globalSetup: './built-test/entry.js',
|
||||
globalSetup: './test/global-setup.e2e.ts',
|
||||
setupFiles: ['./test/setup.e2e.ts'],
|
||||
},
|
||||
}),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue