Skip to content

Commit

Permalink
Docs: minor fixes. [short flow]
Browse files Browse the repository at this point in the history
  • Loading branch information
godai78 committed Sep 3, 2024
1 parent 2ac8dcc commit 5f8b8d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/getting-started/integrations/react.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ For more information, please refer to the {@link getting-started/setup/ui-langua

### Potential issues with Jest testing

Jest is the default test runner used by many React apps. Unfortunately, Jest does not use a real browser – instead, it runs tests in Node.js with the use of JSDOM. JSDOM is not a complete DOM implementation and while it's apparently sufficient for standard apps, it's not able to polyfill all the DOM APIs that CKEditor 5 requires.
Jest is the default test runner used by many React apps. Unfortunately, Jest does not use a real browser. Instead, it runs tests in Node.js with the use of JSDOM. JSDOM is not a complete DOM implementation and while it is apparently sufficient for standard apps, it is not able to polyfill all the DOM APIs that CKEditor 5 requires.

A better approach to test the component inside a fully-fledged web browser, implementing a complete DOM, is to use [`jest-puppeteer`](https://github.com/smooth-code/jest-puppeteer).

Expand Down Expand Up @@ -367,7 +367,7 @@ it('updates', async () => {
});
```

The mocks above test only two basic scenarios, and it is likely that more will need to be added, which may change with each version of the editor.
The mocks presented above only test two basic scenarios, and it is likely that more will need to be added, which may change with each version of the editor.

## Contributing and reporting issues

Expand Down

0 comments on commit 5f8b8d3

Please sign in to comment.