We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3a85065 commit 4b9f45bCopy full SHA for 4b9f45b
1 file changed
packages/jest-environment-jsdom/src/index.ts
@@ -31,7 +31,7 @@ class JSDOMEnvironment implements JestEnvironment<number> {
31
moduleMocker: ModuleMocker | null;
32
33
constructor(config: Config.ProjectConfig, options?: EnvironmentContext) {
34
- this.dom = new JSDOM('<!DOCTYPE html>', {
+ this.dom = new JSDOM(typeof config.testEnvironmentOptions.html === 'string' ? config.testEnvironmentOptions.html : '<!DOCTYPE html>', {
35
pretendToBeVisual: true,
36
resources:
37
typeof config.testEnvironmentOptions.userAgent === 'string'
0 commit comments