mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-04 05:08:42 +08:00
887ddf0ed1
* test: optimize command * chore: add force options * chore: kill child process
24 lines
563 B
TypeScript
24 lines
563 B
TypeScript
import { runCommand, runNocoBase } from './utils';
|
|
|
|
const abortController = new AbortController();
|
|
|
|
process.on('SIGINT', () => {
|
|
abortController.abort();
|
|
process.exit();
|
|
});
|
|
|
|
const run = async () => {
|
|
const { awaitForNocoBase } = await runNocoBase({
|
|
stdio: 'ignore', // 不输出服务的日志,避免干扰测试的日志
|
|
signal: abortController.signal,
|
|
});
|
|
|
|
await awaitForNocoBase();
|
|
|
|
console.log('Start running tests...');
|
|
await runCommand('npx', ['playwright', 'test', ...process.argv.slice(2)]);
|
|
abortController.abort();
|
|
};
|
|
|
|
run();
|