diff --git a/packages/vant-cli/src/commands/jest.ts b/packages/vant-cli/src/commands/jest.ts index 368d49d19..08220dc17 100644 --- a/packages/vant-cli/src/commands/jest.ts +++ b/packages/vant-cli/src/commands/jest.ts @@ -15,6 +15,10 @@ export function test(command: any) { watch: command.watch, config: JEST_CONFIG_FILE, clearCache: command.clearCache, + changedSince: command.changedSince, + logHeapUsage: command.logHeapUsage, + runInBand: command.runInBand, + debug: command.debug, } as any; runCLI(config, [ROOT]) diff --git a/packages/vant-cli/src/index.ts b/packages/vant-cli/src/index.ts index 90c069af3..411970e51 100755 --- a/packages/vant-cli/src/index.ts +++ b/packages/vant-cli/src/index.ts @@ -37,6 +37,22 @@ command('test') '--clearCache', 'Clears the configured Jest cache directory and then exits' ) + .option( + '--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); command('clean')