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

refactor(jest-runtime)!: remove Context type, it must be imported from @jest/test-result #12685

Merged
merged 4 commits into from
Apr 18, 2022
Merged

refactor(jest-runtime)!: remove Context type, it must be imported from @jest/test-result #12685

merged 4 commits into from
Apr 18, 2022

Conversation

mrazauskas
Copy link
Contributor

Summary

At the moment jest-runtime and @jest/test-result are defining and exporting the same type: Context or TestContex. Looks redundant. Perhaps it would be enough to export it from @jest/test-result only?

Test plan

Green CI.

@@ -57,9 +61,6 @@ import {
decodePossibleOutsideJestVmPath,
findSiblingsWithFileExtension,
} from './helpers';
import type {Context} from './types';

export type {Context} from './types';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Would be fine to keep reexport, but is it useful?

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.

Nice! Always good to reduce duplication

@SimenB SimenB merged commit d2f3dc6 into jestjs:main Apr 18, 2022
@mrazauskas mrazauskas deleted the refactor-TestContext-type branch April 18, 2022 11:21
@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 May 19, 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