diff --git a/scripts/tasks/src/jest.ts b/scripts/tasks/src/jest.ts index c74ffa25996972..0f4f069fc718d7 100644 --- a/scripts/tasks/src/jest.ts +++ b/scripts/tasks/src/jest.ts @@ -1,10 +1,10 @@ -import { JestTaskOptions, logger } from 'just-scripts'; +import { logger } from 'just-scripts'; // eslint-disable-next-line import/no-extraneous-dependencies import { spawn } from 'just-scripts-utils'; import { JustArgs, getJustArgv } from './argv'; -const commonJestTask = (options: JestTaskOptions = {}) => { +const commonJestTask = (options: JestTaskConfig = {}) => { const { nodeArgs, _ = [], @@ -18,9 +18,9 @@ const commonJestTask = (options: JestTaskOptions = {}) => { registry, // these args without explicit handling will be passed directly through to jest ...otherArgs - } = getJustArgv() as JustArgs & JestTaskOptions; + } = getJustArgv() as JustArgs & JestTaskConfig; - return jestTask({ ...otherArgs }); + return jestTask({ ...options, ...otherArgs }); }; export const jest = () => { @@ -31,7 +31,7 @@ export const jestWatch = () => { return commonJestTask({ watch: true }); }; -export type JestTaskConfig = { +type JestTaskConfig = { config?: string; passWithNoTests?: boolean; cache?: boolean;