nocobase2/scripts/runE2e.setup.ts
被雨水过滤的空气-Rain 887ddf0ed1
test: optimize command (#3030)
* test: optimize command

* chore: add force options

* chore: kill child process
2023-11-14 10:04:09 +08:00

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();