Skip to content

Commit

Permalink
feat(react): make React schematics use babel-jest by default
Browse files Browse the repository at this point in the history
The babelJest option was removed from the React application
and library schematics and set to true by default

ISSUES CLOSED: 2365
  • Loading branch information
BigAB committed Jun 11, 2020
1 parent d17d437 commit 8d53da1
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 54 deletions.
10 changes: 0 additions & 10 deletions docs/angular/api-react/schematics/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,6 @@ nx g app myapp --routing

## Options

### babelJest

Alias(es): babel-jest

Default: `false`

Type: `boolean`

Use babel-jest instead of ts-jest

### classComponent

Alias(es): C
Expand Down
10 changes: 0 additions & 10 deletions docs/angular/api-react/schematics/library.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,6 @@ Type: `string`

The application project to add the library route to

### babelJest

Alias(es): babel-jest

Default: `false`

Type: `boolean`

Use babel-jest instead of ts-jest

### component

Default: `true`
Expand Down
10 changes: 0 additions & 10 deletions docs/react/api-react/schematics/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,6 @@ nx g app myapp --routing

## Options

### babelJest

Alias(es): babel-jest

Default: `false`

Type: `boolean`

Use babel-jest instead of ts-jest

### classComponent

Alias(es): C
Expand Down
10 changes: 0 additions & 10 deletions docs/react/api-react/schematics/library.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,6 @@ Type: `string`

The application project to add the library route to

### babelJest

Alias(es): babel-jest

Default: `false`

Type: `boolean`

Use babel-jest instead of ts-jest

### component

Default: `true`
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/schematics/application/lib/add-jest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function addJest(options: NormalizedSchema): Rule {
supportTsx: true,
skipSerializers: true,
setupFile: 'none',
babelJest: options.babelJest,
babelJest: true,
})
: noop();
}
6 changes: 0 additions & 6 deletions packages/react/src/schematics/application/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,6 @@
"description": "Test runner to use for unit tests",
"default": "jest"
},
"babelJest": {
"type": "boolean",
"alias": "babel-jest",
"description": "Use babel-jest instead of ts-jest",
"default": false
},
"e2eTestRunner": {
"type": "string",
"enum": ["cypress", "none"],
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/schematics/library/library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default function (schema: Schema): Rule {
setupFile: 'none',
supportTsx: true,
skipSerializers: true,
babelJest: options.babelJest,
babelJest: true,
})
: noop(),
options.component
Expand Down
6 changes: 0 additions & 6 deletions packages/react/src/schematics/library/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@
"description": "Test runner to use for unit tests",
"default": "jest"
},
"babelJest": {
"type": "boolean",
"alias": "babel-jest",
"description": "Use babel-jest instead of ts-jest",
"default": false
},
"tags": {
"type": "string",
"description": "Add tags to the library (used for linting)",
Expand Down

0 comments on commit 8d53da1

Please sign in to comment.