Skip to content

Commit

Permalink
[docs]Add Jest note on Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
matteo-hertel authored and staylor committed Aug 14, 2019
1 parent 3802f7a commit 7a73947
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ renderToNodeStream(app)
.pipe(res);
```

## Usage in Jest
While testing in using jest, if there is a need to emulate SSR, the following string is required to have the test behave the way they are expected to.

```
import { HelmetProvider } from 'react-helmet-async';
HelmetProvider.canUseDOM = false;
```

## License

Licensed under the Apache 2.0 License, Copyright © 2018 Scott Taylor

0 comments on commit 7a73947

Please sign in to comment.