Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: thymikee/jest-preset-angular
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 18b7170950a760480619d530d1ff369d2eec5208
Choose a base ref
..
head repository: thymikee/jest-preset-angular
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9a4ce00f29bbd397d14d5ae2aba97508c933d1bc
Choose a head ref
Showing with 6 additions and 67 deletions.
  1. +2 −0 CHANGELOG.md
  2. +4 −4 README.md
  3. +0 −43 example/src/app/service/storage.service.spec.ts
  4. +0 −20 example/src/app/service/storage.service.ts
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@

* (**BREAKING**): Upgrade ts-jest to ^23.10.4 and use ast-transformer instead of processor ([#204](https://github.com/thymikee/jest-preset-angular/pull/204))
* Chore: Remove template literal character escaping (reverts [#34](https://github.com/thymikee/jest-preset-angular/pull/34))
* Feat: Use test environment JSDOM v13 by default ([#229](https://github.com/thymikee/jest-preset-angular/pull/229))


#### Migration Guide

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -421,15 +421,15 @@ The same declaration can be applied to other vendor libraries.

Reference: https://github.com/facebook/jest/issues/708

### Failing with Node < v6
### Failing with Node v7 or lower

By default we use JSDOM v13, which requires Node v6. If you want to use Node in a lower version than 6 to run your tests, make sure to configure jest to use an older JSDOM version, either in your `jest.config.js`, `jest.config.json`, `package.json`:
By default we use JSDOM v13, which requires Node v8+. If you want to use Node in a lower version to run your tests, make sure to configure jest to use an older JSDOM version, either in your `jest.config.js`, `jest.config.json` or `package.json`:

```json
"testEnvironment": "jsdom"
```

If you fallback to JSDOM v11 or lower, you might have to mock `localStorage` or `sessionStorage` on your own or using some third-party library to do so by loading it in `setupFilesAfterEnv`.
If you use JSDOM v11 or lower, you might have to mock `localStorage` or `sessionStorage` on your own or using some third-party library by loading it in `setupFilesAfterEnv`.

Reference: https://jestjs.io/docs/en/configuration.html#testenvironment-string
Reference: https://jestjs.io/docs/en/configuration.html#testenvironment-string, https://github.com/jsdom/jsdom/blob/master/Changelog.md#1200

43 changes: 0 additions & 43 deletions example/src/app/service/storage.service.spec.ts

This file was deleted.

20 changes: 0 additions & 20 deletions example/src/app/service/storage.service.ts

This file was deleted.