Skip to content

Commit

Permalink
feat(jest-cli): Export yargsOptions (#13970)
Browse files Browse the repository at this point in the history
  • Loading branch information
willc001 authored Mar 2, 2023
1 parent df6ddd8 commit 0e8ed24
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- `[jest-changed-files]` Support Sapling ([#13941](https://github.com/facebook/jest/pull/13941))
- `[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))
- `[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))
- `[jest-cli]` Export `yargsOptions` ([#13970](https://github.com/facebook/jest/pull/13970))
- `[jest-config]` Add `openHandlesTimeout` option to configure possible open handles warning. ([#13875](https://github.com/facebook/jest/pull/13875))
- `[@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))
- `[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))
Expand Down
13 changes: 13 additions & 0 deletions packages/jest-cli/__typetests__/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/

import {expectType} from 'tsd-lite';
import type {Options} from 'yargs';
import {yargsOptions} from 'jest-cli';

expectType<{[key: string]: Options}>(yargsOptions);
4 changes: 4 additions & 0 deletions packages/jest-cli/__typetests__/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "../../../tsconfig.typetest.json",
"include": ["./**/*"]
}
3 changes: 2 additions & 1 deletion packages/jest-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
"@types/exit": "^0.1.30",
"@types/graceful-fs": "^4.1.3",
"@types/prompts": "^2.0.1",
"@types/yargs": "^17.0.8"
"@types/yargs": "^17.0.8",
"tsd-lite": "^0.6.0"
},
"peerDependencies": {
"node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0"
Expand Down
1 change: 1 addition & 0 deletions packages/jest-cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
*/

export {run} from './run';
export {options as yargsOptions} from './args';
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12629,6 +12629,7 @@ __metadata:
jest-util: "workspace:^"
jest-validate: "workspace:^"
prompts: ^2.0.1
tsd-lite: ^0.6.0
yargs: ^17.3.1
peerDependencies:
node-notifier: ^8.0.1 || ^9.0.0 || ^10.0.0
Expand Down

0 comments on commit 0e8ed24

Please sign in to comment.