Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
### Chore & Maintenance

- `[jest-cli]` Move internal config initialisation logic to the `create-jest` package ([#14465](https://github.com/jestjs/jest/pull/14453))
- `[jest-cli]` [**BREAKING**] Remove deprecated `--init` argument ([#9968](https://github.com/jestjs/jest/pull/14490))
- `[jest-types]` [**BREAKING**] Remove deprecated `init` option ([#9968](https://github.com/jestjs/jest/pull/14490))

## 29.6.4

Expand Down
4 changes: 0 additions & 4 deletions docs/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,6 @@ Show the help information, similar to this page.

Ignore the tests of the specified projects. Jest uses the attribute `displayName` in the configuration to identify each project. If you use this option, you should provide a `displayName` to all your projects.

### `--init`

Generate a basic configuration file. Based on your project, Jest will ask you a few questions that will help to generate a `jest.config.js` file with a short description for each option.

### `--injectGlobals`

Insert Jest's globals (`expect`, `test`, `describe`, `beforeEach` etc.) into the global environment. If you set this to `false`, you should import from `@jest/globals`, e.g.
Expand Down
1 change: 0 additions & 1 deletion packages/jest-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"@jest/test-result": "workspace:^",
"@jest/types": "workspace:^",
"chalk": "^4.0.0",
"create-jest": "workspace:^",
"exit": "^0.1.2",
"import-local": "^3.0.2",
"jest-config": "workspace:^",
Expand Down
4 changes: 0 additions & 4 deletions packages/jest-cli/src/args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,6 @@ export const options: {[key: string]: Options} = {
string: true,
type: 'array',
},
init: {
description: 'Generate a basic configuration file',
type: 'boolean',
},
injectGlobals: {
description: 'Should Jest inject global variables or not',
type: 'boolean',
Expand Down
7 changes: 0 additions & 7 deletions packages/jest-cli/src/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import yargs = require('yargs');
import {getVersion, runCLI} from '@jest/core';
import type {AggregatedResult} from '@jest/test-result';
import type {Config} from '@jest/types';
import {runCreate} from 'create-jest';
import {deprecationEntries} from 'jest-config';
import {clearLine, tryRealpath} from 'jest-util';
import {validateCLIOptions} from 'jest-validate';
Expand All @@ -24,12 +23,6 @@ export async function run(
): Promise<void> {
try {
const argv = await buildArgv(maybeArgv);

if (argv.init) {
await runCreate();
return;
}

const projects = getProjectListFromCLIArgs(argv, project);

const {results, globalConfig} = await runCLI(argv, projects);
Expand Down
1 change: 0 additions & 1 deletion packages/jest-cli/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"include": ["./src/**/*"],
"exclude": ["./**/__tests__/**/*"],
"references": [
{"path": "../create-jest"},
{"path": "../jest-config"},
{"path": "../jest-core"},
{"path": "../jest-test-result"},
Expand Down
1 change: 0 additions & 1 deletion packages/jest-types/src/Config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,6 @@ export type Argv = Arguments<
globalTeardown: string | null | undefined;
haste: string;
ignoreProjects: Array<string>;
init: boolean;
injectGlobals: boolean;
json: boolean;
lastCommit: boolean;
Expand Down
3 changes: 1 addition & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8021,7 +8021,7 @@ __metadata:
languageName: node
linkType: hard

"create-jest@workspace:^, create-jest@workspace:packages/create-jest":
"create-jest@workspace:packages/create-jest":
version: 0.0.0-use.local
resolution: "create-jest@workspace:packages/create-jest"
dependencies:
Expand Down Expand Up @@ -12417,7 +12417,6 @@ __metadata:
"@types/exit": ^0.1.30
"@types/yargs": ^17.0.8
chalk: ^4.0.0
create-jest: "workspace:^"
exit: ^0.1.2
import-local: ^3.0.2
jest-config: "workspace:^"
Expand Down