Skip to content

Commit 0e8ed24

Browse files
authored
feat(jest-cli): Export yargsOptions (#13970)
1 parent df6ddd8 commit 0e8ed24

File tree

6 files changed

+22
-1
lines changed

6 files changed

+22
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- `[jest-changed-files]` Support Sapling ([#13941](https://github.com/facebook/jest/pull/13941))
66
- `[jest-circus, @jest/cli, jest-config]` Add feature to randomize order of tests via CLI flag or through the config file([#12922](https://github.com/facebook/jest/pull/12922))
77
- `[jest-cli, jest-config, @jest/core, jest-haste-map, @jest/reporters, jest-runner, jest-runtime, @jest/types]` Add `workerThreads` configuration option to allow using [worker threads](https://nodejs.org/dist/latest/docs/api/worker_threads.html) for parallelization ([#13939](https://github.com/facebook/jest/pull/13939))
8+
- `[jest-cli]` Export `yargsOptions` ([#13970](https://github.com/facebook/jest/pull/13970))
89
- `[jest-config]` Add `openHandlesTimeout` option to configure possible open handles warning. ([#13875](https://github.com/facebook/jest/pull/13875))
910
- `[@jest/create-cache-key-function]` Allow passing `length` argument to `createCacheKey()` function and set its default value to `16` on Windows ([#13827](https://github.com/facebook/jest/pull/13827))
1011
- `[jest-message-util]` Add support for [AggregateError](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError) ([#13946](https://github.com/facebook/jest/pull/13946) & [#13947](https://github.com/facebook/jest/pull/13947))
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*
7+
*/
8+
9+
import {expectType} from 'tsd-lite';
10+
import type {Options} from 'yargs';
11+
import {yargsOptions} from 'jest-cli';
12+
13+
expectType<{[key: string]: Options}>(yargsOptions);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "../../../tsconfig.typetest.json",
3+
"include": ["./**/*"]
4+
}

packages/jest-cli/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
"@types/exit": "^0.1.30",
3131
"@types/graceful-fs": "^4.1.3",
3232
"@types/prompts": "^2.0.1",
33-
"@types/yargs": "^17.0.8"
33+
"@types/yargs": "^17.0.8",
34+
"tsd-lite": "^0.6.0"
3435
},
3536
"peerDependencies": {
3637
"node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"

packages/jest-cli/src/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
*/
77

88
export {run} from './run';
9+
export {options as yargsOptions} from './args';

yarn.lock

+1
Original file line numberDiff line numberDiff line change
@@ -12629,6 +12629,7 @@ __metadata:
1262912629
jest-util: "workspace:^"
1263012630
jest-validate: "workspace:^"
1263112631
prompts: ^2.0.1
12632+
tsd-lite: ^0.6.0
1263212633
yargs: ^17.3.1
1263312634
peerDependencies:
1263412635
node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0

0 commit comments

Comments
 (0)