Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove @types/jsdom dependency #12107

Merged
merged 2 commits into from Dec 1, 2021
Merged

Conversation

SimenB
Copy link
Collaborator

@SimenB SimenB commented Dec 1, 2021

Summary

Closes #12098

Test plan

diff --git i/packages/jest-environment-jsdom/build/index.d.ts w/packages/jest-environment-jsdom/build/index.d.ts
index 2647e36a9e..9d8aba33ea 100644
--- i/packages/jest-environment-jsdom/build/index.d.ts
+++ w/packages/jest-environment-jsdom/build/index.d.ts
@@ -6,7 +6,6 @@
  */
 /// <reference types="node" />
 import type { Context } from 'vm';
-import { JSDOM } from 'jsdom';
 import type { EnvironmentContext, JestEnvironment } from '@jest/environment';
 import { LegacyFakeTimers, ModernFakeTimers } from '@jest/fake-timers';
 import type { Config, Global } from '@jest/types';
@@ -17,13 +16,11 @@ declare type Win = Window & Global.Global & {
     };
 };
 declare class JSDOMEnvironment implements JestEnvironment<number> {
-    dom: JSDOM | null;
+    private dom;
     fakeTimers: LegacyFakeTimers<number> | null;
     fakeTimersModern: ModernFakeTimers | null;
     global: Win;
-    errorEventListener: ((event: Event & {
-        error: Error;
-    }) => void) | null;
+    private errorEventListener;
     moduleMocker: ModuleMocker | null;
     constructor(config: Config.ProjectConfig, options?: EnvironmentContext);
     setup(): Promise<void>;

@codecov-commenter
Copy link

@codecov-commenter codecov-commenter commented Dec 1, 2021

Codecov Report

Merging #12107 (0cb5e19) into main (26abf9a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main   #12107   +/-   ##
=======================================
  Coverage   67.65%   67.65%           
=======================================
  Files         328      328           
  Lines       16990    16990           
  Branches     4817     4817           
=======================================
  Hits        11495    11495           
  Misses       5462     5462           
  Partials       33       33           
Impacted Files Coverage Δ
packages/jest-environment-jsdom/src/index.ts 74.57% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26abf9a...0cb5e19. Read the comment docs.

@SimenB SimenB merged commit f9814d2 into facebook:main Dec 1, 2021
33 of 34 checks passed
@SimenB SimenB deleted the drop-jsdom-types branch Dec 1, 2021
@Jason3S
Copy link

@Jason3S Jason3S commented Dec 2, 2021

@SimenB Thank you!

@pflorek
Copy link

@pflorek pflorek commented Dec 3, 2021

👍

@github-actions
Copy link

@github-actions github-actions bot commented Jan 3, 2022

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants