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

chore: move @jest/test-utils reference #13468

Merged
merged 5 commits into from
Feb 4, 2023
Merged

chore: move @jest/test-utils reference #13468

merged 5 commits into from
Feb 4, 2023

Conversation

mrazauskas
Copy link
Contributor

Summary

Currently @jest/test-utils package is referenced in packages/*/tsconfig.json files. These tsconfigs exclude ./**/__tests__/**/* (all test files), but @jest/test-utils is used only in the test files.

Seems that moving the reference to __tests__/tsconfig.json files is more precise. tsc would build types @jest/test-utils as one of the last and will not think that type other packages depend on @jest/test-utils. Only tests depend on it, but they are excluded from the build tsconfigs.

Test plan

Green CI.

declare const describe: Global.TestFrameworkGlobals['describe'];
declare const test: Global.TestFrameworkGlobals['test'];
import semver = require('semver');
import {describe, test} from '@jest/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.

This should work now as expected. Looks right to import from @jest/globals.

@@ -30,7 +30,6 @@
"walker": "^1.0.8"
},
"devDependencies": {
"@jest/test-utils": "workspace:^",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not used.

scripts/buildTs.mjs Outdated Show resolved Hide resolved
@mrazauskas mrazauskas marked this pull request as draft October 18, 2022 14:42
@SimenB
Copy link
Member

SimenB commented Nov 7, 2022

Any news on this one? 😀

@mrazauskas
Copy link
Contributor Author

Thanks for reminder. Got swamped with some stuff, but I will come back very soon.

@SimenB
Copy link
Member

SimenB commented Jan 26, 2023

👋

scripts/buildTs.mjs Outdated Show resolved Hide resolved
@mrazauskas mrazauskas marked this pull request as ready for review February 4, 2023 11:29
scripts/buildTs.mjs Outdated Show resolved Hide resolved
scripts/buildTs.mjs Outdated Show resolved Hide resolved
mrazauskas and others added 2 commits February 4, 2023 13:36
Co-authored-by: Simen Bekkhus <sbekkhus91@gmail.com>
@SimenB SimenB merged commit ffe2352 into jestjs:main Feb 4, 2023
@SimenB
Copy link
Member

SimenB commented Feb 4, 2023

Great stuff, thanks!

@github-actions
Copy link

github-actions bot commented Mar 7, 2023

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 Mar 7, 2023
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