Skip to content

Commit

Permalink
docs(devs-infra): add additional info to README and online doc (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl authored May 12, 2021
1 parent 013e5c3 commit 7433414
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 18 deletions.
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ please check [online documentation](https://thymikee.github.io/jest-preset-angul
Install using [`yarn`](https://yarnpkg.com/en/package/jest-preset-angular):

```bash
yarn add -D jest jest-preset-angular
yarn add -D jest jest-preset-angular @types/jest
```

Or [`npm`](https://www.npmjs.com/package/jest-preset-angular):

```bash
npm install -D jest jest-preset-angular
npm install -D jest jest-preset-angular @types/jest
```

## Configuration
Expand Down Expand Up @@ -59,11 +59,32 @@ module.exports = {
}
```

Adjust your `tsconfig.spec.json` to be:

```json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": ["jest"]
},
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
}
```

## Angular Ivy

Check out our [Angular Ivy guidance](https://thymikee.github.io/jest-preset-angular/docs/guides/angular-ivy)

## Example apps

We have [example apps](https://github.com/thymikee/jest-preset-angular/tree/master/examples) to provide a basic setup to use Jest in an Angular project.

## Built With

- [TypeScript](https://www.typescriptlang.org/) - JavaScript that scales
- [Angular](https://angular.io/) - The modern web developer's platform
- [`ts-jest`](https://kulshekhar.github.io/ts-jest) - Jest processor for TypeScript
- [`ts-jest`](https://kulshekhar.github.io/ts-jest) - Jest transformer for TypeScript

## Authors/maintainers

Expand Down
4 changes: 2 additions & 2 deletions examples/example-app-v10/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "example-app-v11",
"name": "example-app-v10",
"version": "0.0.0",
"scripts": {
"ng": "ng",
Expand Down Expand Up @@ -33,4 +33,4 @@
"ts-node": "^9.1.1",
"typescript": "~4.0.7"
}
}
}
3 changes: 0 additions & 3 deletions examples/example-app-v10/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"jest"
]
},
"files": [
"src/polyfills.ts"
],
"include": [
"src/**/*.spec.ts",
"src/**/*.d.ts"
Expand Down
3 changes: 0 additions & 3 deletions examples/example-app-v11/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"jest"
]
},
"files": [
"src/polyfills.ts"
],
"include": [
"src/**/*.spec.ts",
"src/**/*.d.ts"
Expand Down
3 changes: 0 additions & 3 deletions examples/example-app-v9/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
"jest"
]
},
"files": [
"src/polyfills.ts"
],
"include": [
"src/**/*.spec.ts",
"src/**/*.d.ts"
Expand Down
17 changes: 15 additions & 2 deletions website/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ You can install `jest-preset-angular` and dependencies all at once with one of t
#### NPM

```sh
npm install -D jest jest-preset-angular
npm install -D jest jest-preset-angular @types/jest
```

#### Yarn

```sh
yarn add -D jest jest-preset-angular
yarn add -D jest jest-preset-angular @types/jest
```

### Configuration
Expand Down Expand Up @@ -50,6 +50,19 @@ module.exports = {
}
```

Adjust your `tsconfig.spec.json` to be:

```json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": ["jest"]
},
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
}
```

### Customizing

#### Global mocks
Expand Down
17 changes: 15 additions & 2 deletions website/versioned_docs/version-8.x/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ You can install `jest-preset-angular` and dependencies all at once with one of t
#### NPM

```sh
npm install -D jest jest-preset-angular
npm install -D jest jest-preset-angular @types/jest
```

#### Yarn

```sh
yarn add -D jest jest-preset-angular
yarn add -D jest jest-preset-angular @types/jest
```

### Configuration
Expand Down Expand Up @@ -50,6 +50,19 @@ module.exports = {
}
```

Adjust your `tsconfig.spec.json` to be:

```json
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./out-tsc/spec",
"types": ["jest"]
},
"include": ["src/**/*.spec.ts", "src/**/*.d.ts"]
}
```

### Customizing

#### Global mocks
Expand Down

0 comments on commit 7433414

Please sign in to comment.