mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
feat(vant-cli): support jest options (#9039)
This commit is contained in:
parent
da9b09b471
commit
0b04522105
@ -30,6 +30,19 @@ command('test')
|
|||||||
'--clearCache',
|
'--clearCache',
|
||||||
'Clears the configured Jest cache directory and then exits'
|
'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('--debug', 'Print debugging info about your Jest config')
|
||||||
.action(test);
|
.action(test);
|
||||||
|
|
||||||
command('clean').description('Clean all dist files').action(clean);
|
command('clean').description('Clean all dist files').action(clean);
|
||||||
|
@ -15,6 +15,10 @@ export function test(command: any) {
|
|||||||
watch: command.watch,
|
watch: command.watch,
|
||||||
config: JEST_CONFIG_FILE,
|
config: JEST_CONFIG_FILE,
|
||||||
clearCache: command.clearCache,
|
clearCache: command.clearCache,
|
||||||
|
changedSince: command.changedSince,
|
||||||
|
logHeapUsage: command.logHeapUsage,
|
||||||
|
runInBand: command.runInBand,
|
||||||
|
debug: command.debug,
|
||||||
// make jest tests faster
|
// make jest tests faster
|
||||||
// see: https://ivantanev.com/make-jest-faster/
|
// see: https://ivantanev.com/make-jest-faster/
|
||||||
maxWorkers: '50%',
|
maxWorkers: '50%',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user