Skip to content

Commit

Permalink
style: code style prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Mar 5, 2020
1 parent 258e37c commit fffbf67
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Expand Up @@ -44,7 +44,9 @@ test('jest maxWorkers', () => {
process.env.MAX_WORKERS = '2';
expect(createDefaultConfig(join(fixtures, 'normal'), {}).maxWorkers).toBe(2);
delete process.env.MAX_WORKERS;
expect(createDefaultConfig(join(fixtures, 'normal'), {}).maxWorkers).toBe(undefined);
expect(createDefaultConfig(join(fixtures, 'normal'), {}).maxWorkers).toBe(
undefined,
);
if (oldMaxWorkers === undefined) {
delete process.env.MAX_WORKERS;
} else {
Expand Down
4 changes: 3 additions & 1 deletion packages/test/src/createDefaultConfig/createDefaultConfig.ts
Expand Up @@ -66,6 +66,8 @@ export default function(cwd: string, args: IUmiTestArgs) {
// `node_modules/(?!([^/]*?umi|[^/]*?umi-test)/)`,
],
// 用于设置 jest worker 启动的个数
...(process.env.MAX_WORKERS ? { maxWorkers: Number(process.env.MAX_WORKERS) } : {}),
...(process.env.MAX_WORKERS
? { maxWorkers: Number(process.env.MAX_WORKERS) }
: {}),
};
}

0 comments on commit fffbf67

Please sign in to comment.