testing-library-docs
jest-dom
testing-library-docs | jest-dom | |
---|---|---|
46 | 23 | |
439 | 4,298 | |
-0.7% | 0.7% | |
8.5 | 7.0 | |
4 days ago | 5 days ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
testing-library-docs
-
Why I rarely use `getByRole`: Testing Library and the first rule of ARIA
Testing Library provides a great set of accessibility-focused tools to locating elements when writing tests. It was created by Kent C Dodds, one of my longtime favorite educators on front-end and testing topics. Since the initial release in 2018 as "React Testing Library", it's grown in popularity beyond its React component testing roots. It now has plugins for all major test runners and JavaScript frameworks, and in 2022 some of its patterns were adopted in Playwright's test runner as the recommended way to locate elements.
-
The best testing strategies for frontends
Probably Enzyme was the first to popularize component testing in React by doing shallow rendering and expecting some things to be there in the React component tree. Then React Testing library came and took component testing to a whole new level.
- Introdução a testes unitários no desenvolvimento de software
-
33 React Libraries Every React Developer Should Have In Their Arsenal
18.react-testing-library
-
What is integration testing in UI/Front End?
Jest has long been my favorite got to test runner when it comes to UI unit and integration testing. With tools like React Testing Library (Testing Library framework for React) you get the benefit of very easy to write and maintain tests, as well as a quick and efficient way to run our tests.
-
Testing Intercepting Routes
I'm writing an intergration test with Testing Library where I'm on a boards dashboard area and a user can click a button to create an item on the board. I'm using an intercepting route to do show the popup form. Once finished the user goes back to their area and should see the created board.
-
Writing your first Unit Test in React
This article uses Jest and React Testing Library. It's okay if you want to use other libraries, the fundamentals in this article will help you there as well.
-
Autotab – Boring AI Agents for real world tasks
This is the idea behind Testing-Library from what I understand.
https://testing-library.com/
-
Mastering Jest: A Complete Guide to Testing Next.js Applications Part-2
The Testing Library: The Testing Library offers guidance on best practices for testing user interfaces effectively, with a focus on user-centric testing.
-
How to run visual tests in 2023
There are great tools like Testing Library that render a single component in a single state and then programmatically inspect the resulting DOM. However, the salient details of the rendered HTML – like color, layout, and scale – are hard to express. So, the tests end up brittle (over-specified) or insufficient (under-specified).
jest-dom
-
Unit tests in React with Jest and Testing Library
Tests structure Queries Roles User events Matchers Jest Matchers testing-library Mock functions
-
Mastering Jest Configuration for React TypeScript Projects with Vite: A Step-by-Step Guide
//config/jest/setupTests.ts // jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom import '@testing-library/jest-dom';
-
Anyone have setup instructions for Vitest + Typescript + React testing library? My setup is failing to extend matchers on Vitest Types
Update: Just got it working. Following the instructions on this github issue and using `shamefully-hoist=true` with pnpm I got it working. The issue I was facing was with pnpm.
-
Is there a jest query method for this use case?
React Testing Library uses jest-dom which has a .getByText() matcher.
-
Setting Up a Modern Preact Application With Typescript, Vite and Vitest
vitest-dom extends the standard Jest matchers with convenient methods like .toBeDisabled. Now you can write tests that assert on the state of the DOM. The package is a fork of @testing-library/jest-dom.
-
Superset: Testing and Enzyme to RTL conversion
jest-dom matchers
-
Migrating from Jest to Vitest
At the time of writing this article, it still seems to be an open issue. However, a workaround I found is to add "skipLibCheck": true, to your tsconfig.json file.
- Buenas prácticas con Angular Testing Library
-
Unable to test React-Redux Toolkit app
// jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom import '@testing-library/jest-dom'; import { server } from './mocks/server'; beforeAll( () => server.listen( { onUnhandledRequest: 'error' } ) ); afterEach( () => server.resetHandlers() ); afterAll( () => server.close() );
-
Setup Jest to React Typescript Vite project, also SWC (part 1)
Everything you want to do to your test environment such as extends the jest matchers with @testing-library/jest-dom, mock some APIs that’s not implemented in jdom, you can put to config/jest/setupTests.js:
What are some alternatives?
jsdom-worker - 👷♀️ Use Web Workers in Jest / JSDOM 🌈
jest - Delightful JavaScript Testing.
react-ui-boilerplate - The boilerplate to help you build React UI library and publish to NPM automatically.
msw - Seamless REST/GraphQL API mocking library for browser and Node.js.
Enzyme - JavaScript Testing utilities for React
Cypress - Fast, easy and reliable testing for anything that runs in a browser.
cypress-realworld-testing - Next.js project for learn.cypress.io
jest-cheat-sheet - Jest cheat sheet
axe-core - Accessibility engine for automated Web UI testing
user-event - 🐕 Simulate user events
docusaurus-plugin-remote-content - A Docusaurus plugin to download content from remote sources when it is needed.
husky - Git hooks made easy 🐶 woof!