| 1 | 'use strict'; |
| 2 | |
| 3 | const {TestEnvironment: JSDOMEnvironment} = require('jest-environment-jsdom'); |
| 4 | const { |
| 5 | setupDocumentReadyState, |
| 6 | } = require('internal-test-utils/ReactJSDOMUtils'); |
| 7 | |
| 8 | /** |
| 9 | * Test environment for testing integration of react-dom (browser) with react-dom/server (node) |
| 10 | */ |
| 11 | class ReactJSDOMEnvironment extends JSDOMEnvironment { |
| 12 | constructor(config, context) { |
| 13 | super(config, context); |
| 14 | |
| 15 | setupDocumentReadyState(this.global.document, this.global.Event); |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | module.exports = ReactJSDOMEnvironment; |