feat(cli): add jest init file

This commit is contained in:
陈嘉涵
2019-12-12 10:55:34 +08:00
parent 24202028e5
commit 9155a7a491
6 changed files with 18 additions and 7 deletions
+6 -1
View File
@@ -1,10 +1,15 @@
import { runCLI } from 'jest';
import { setNodeEnv } from '../common';
import { CWD, JEST_CONFIG_FILE } from '../common/constant';
import { genPackageEntry } from '../compiler/gen-package-entry';
import { CWD, JEST_CONFIG_FILE, PACKAGE_ENTRY_FILE } from '../common/constant';
export function test(command: any) {
setNodeEnv('test');
genPackageEntry({
outputPath: PACKAGE_ENTRY_FILE
});
const config = {
rootDir: CWD,
watch: command.watch,