types(cli): jest config type (#10012)

This commit is contained in:
neverland
2021-12-08 09:48:24 +08:00
committed by GitHub
parent 8bb344c7a5
commit 59cbedb7d5
3 changed files with 170 additions and 19 deletions
+3 -2
View File
@@ -6,8 +6,9 @@ import {
JEST_CONFIG_FILE,
PACKAGE_ENTRY_FILE,
} from '../common/constant.js';
import type { Config } from '@jest/types';
export function test(command: any) {
export function test(command: Config.Argv) {
setNodeEnv('test');
genPackageEntry({
@@ -26,7 +27,7 @@ export function test(command: any) {
// make jest tests faster
// see: https://ivantanev.com/make-jest-faster/
maxWorkers: '50%',
} as any;
} as Config.Argv;
jest
.runCLI(config, [ROOT])