Skip to content

Conversation

@mrazauskas
Copy link
Contributor

Summary

While working on #12856, I have noticed a manual mock in jest-environment-jsdom package. It had few type errors. I was trying to fix those, but it seems like this mock is unused. The API inside the mock are outdated and if the file is removed tests are passing locally. Just wondering what CI thinks?

Test plan

Green CI.

console: {},
};

const globalValues = {...config.globals};
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To work this should be ...projectConfig.globals

}
});

JSDOMEnvironment.prototype.runSourceText.mockImplementation(function (
Copy link
Contributor Author

@mrazauskas mrazauskas Aug 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like runSourceText is not a member of JSDOMEnvironment for some time. TS gives an error here, but there is no way to fix it

@mrazauskas mrazauskas marked this pull request as ready for review August 14, 2022 11:28
@mrazauskas mrazauskas changed the title chore: remove unused (possibly?) jest-environment-jsdom mock chore: remove unused jest-environment-jsdom mock Aug 14, 2022
Copy link
Member

@SimenB SimenB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch 👍 runSourceText was removed all the way back in 25b8369 😅

@SimenB SimenB merged commit 7b52a2e into jestjs:main Aug 15, 2022
@mrazauskas mrazauskas deleted the chore-remove-jsom-mock branch August 15, 2022 16:02
@github-actions
Copy link

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 Sep 15, 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.

3 participants