test: migrate test runner to vitest (#12206)

This commit is contained in:
neverland
2023-08-20 18:48:09 +08:00
committed by GitHub
parent 633e48a645
commit 694daef6ea
374 changed files with 38189 additions and 31347 deletions
-33
View File
@@ -22,39 +22,6 @@ program
return lint();
});
program
.command('test')
.description('Run unit tests through jest')
.option(
'--watch',
'Watch files for changes and rerun tests related to changed files',
)
.option(
'--clearCache',
'Clears the configured Jest cache directory and then exits',
)
.option(
'--changedSince <changedSince>',
'Runs tests related to the changes since the provided branch or commit hash',
)
.option(
'--logHeapUsage',
'Logs the heap usage after every test. Useful to debug memory leaks',
)
.option(
'--runInBand',
'Run all tests serially in the current process, rather than creating a worker pool of child processes that run tests',
)
.option(
'--updateSnapshot',
'Re-record every snapshot that fails during this test run',
)
.option('--debug', 'Print debugging info about your Jest config')
.action(async (options) => {
const { test } = await import('./commands/jest.js');
return test(options);
});
program
.command('clean')
.description('Clean all dist files')