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

View File

@@ -53,7 +53,6 @@
"@babel/preset-typescript": "^7.16.0",
"@docsearch/css": "3.0.0-alpha.41",
"@docsearch/js": "3.0.0-alpha.41",
"@types/jest": "^27.0.2",
"@vant/eslint-config": "^3.3.2",
"@vant/markdown-vetur": "^2.2.0",
"@vant/stylelint-config": "^1.4.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])