Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add missing documentation about using @testing-library/jest-dom with TypeScript #1472

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

Merged
timdeschryver merged 3 commits into testing-library:main from neknalb:patch-1
Mar 3, 2025

Conversation

Copy link
Contributor

@neknalb neknalb commented Feb 18, 2025
edited
Loading

As I found out with my SvelteKit 5 project, we need to add "types": ["@testing-library/jest-dom"] to the compilerOptions in the project's tsconfig.json. Otherwise VSCode complains that it can't find e.g. toBeInTheDocument (Property 'toBeInTheDocument' does not exist on type 'Assertion'.ts(2339)).

I'm no TypeScript Pro, so feel free to reword what I wrote. :-)

As I found out with my SvelteKit 5 project, we need to add `"types": ["@testing-library/jest-dom"]` to the `compilerOptions` in the project's `tsconfig.json`. Otherwise my VSCode complains that it can't find e.g. `toBeInTheDocument` (Property 'toBeInTheDocument' does not exist on type 'Assertion<HTMLElement>'.ts(2339)).
I'm no TypeScript Pro, so feel free to reword what I wrote. :-)
Copy link

netlify bot commented Feb 18, 2025
edited
Loading

Deploy Preview for testing-library ready!

Name Link
🔨 Latest commit 6bee869
🔍 Latest deploy log https://app.netlify.com/sites/testing-library/deploys/67bd6fcee3437b0008bd4093
😎 Deploy Preview https://deploy-preview-1472--testing-library.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@neknalb neknalb changed the title (削除) Update setup.mdx (削除ここまで) (追記) Add missing documentation about using @testing-library/jest-dom with TypeScript (追記ここまで) Feb 18, 2025
@neknalb neknalb marked this pull request as ready for review February 18, 2025 08:46
neknalb and others added 2 commits February 24, 2025 22:54
Co-authored-by: Tim Deschryver <28659384+timdeschryver@users.noreply.github.com>
Copy link
Member

@timdeschryver timdeschryver left a comment
edited
Loading

Choose a reason for hiding this comment

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

Thanks @neknalb! This is fine, you don't have to update the jest-dom docs as it's already mentioned there.

@timdeschryver timdeschryver merged commit 1ea4229 into testing-library:main Mar 3, 2025
4 checks passed
Copy link
Member

Copy link
Member

@all-contributors please add @neknalb for docs

Copy link
Contributor

@timdeschryver

I've put up a pull request to add @neknalb! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@timdeschryver timdeschryver timdeschryver approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /