mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 18:56:52 +00: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();
|