Skip to content

Commit 8bc9ca7

Browse files
committed
fix: 🐛 (globals) remove wrong globals documentation
1 parent 576291e commit 8bc9ca7

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

README.md

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
- [Getting started](#getting-started)
1616
- [Installation](#installation)
1717
- [Usage with an import](#usage-with-an-import)
18-
- [Provide phl as a Jest global](#provide-phl-as-a-jest-global)
1918
- [API](#api)
2019
- [Examples](#examples)
2120
- [Pass in specific DebugElement](#pass-in-specific-debugelement)
@@ -75,42 +74,6 @@ describe('my test suite', () => {
7574

7675
> Note that this way adds a import method. To make sure this import statement gets cleaned up we should configure our eslint to clean up unused imports. More: https://www.npmjs.com/package/eslint-plugin-unused-imports.
7776
78-
### Provide phl as a Jest global
79-
80-
Maybe you don't want to use a plugin that cleans up unused imports or maybe this import statement just annoys you. If that's the case, you have to option to provide the `phl` method as a Jest global. Similar to `it`, `describe` or `expect`.
81-
82-
1. rename you jest config from `jest.config.js` to `jest.config.mjs`. Using the `.mjs` extension allows us to use ES Modules inside our Jest config. Jest officially supports `.mjs` configuration files.
83-
84-
2. Import `phl` from `@angular-extensions/pretty-html-log` and provide it as a global inside your `jest.config.mjs`:
85-
86-
```javascript
87-
import { phl } from '@angular-extensions/pretty-html-log';
88-
89-
module.exports = {
90-
globals: {
91-
phl
92-
}
93-
};
94-
```
95-
96-
3. Import `@angular-extensions/pretty-html-log` inside your jest.setup.ts
97-
98-
```typescript
99-
import 'jest-preset-angular/setup-jest';
100-
import '@angular-extensions/pretty-html-log';
101-
```
102-
103-
4. Start using it inside your tests without the usage of import 🤩
104-
105-
```typescript
106-
describe('my test suite', () => {
107-
it('should be green', () => {
108-
phl(fixture); // This will pretty print the fixture
109-
expect(myTable.getRows()).toBe(5);
110-
});
111-
});
112-
```
113-
11477
## API
11578

11679
The `phl` method has the following signature:

0 commit comments

Comments
 (0)