angular-testing-library
dom-testing-library
angular-testing-library | dom-testing-library | |
---|---|---|
5 | 4 | |
681 | 3,232 | |
2.1% | 0.4% | |
7.4 | 6.5 | |
7 days ago | 14 days ago | |
TypeScript | 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.
angular-testing-library
-
Mi experience with unit testing in Angular: third time lucky! 💪🏻
A few months ago some colleagues told me about their smooth experience with Jest and Testing Library in a Vue application. Last week I gave it a shot. It took me a couple of hours to remove all Karma and Jasmine dependencies, and to properly configure this new testing platform. After that, I tried to refactor a small component by test driven development, again. This time, it was easier to render each component and its dependencies. However, there weren't enough enough examples and real use cases for testing the actual behavior of the components with ease (even with resources like this or this).
- Usando selectores correctos en Angular Testing Library
-
Obteniendo el mayor valor nuestros tests en Angular
Angular Testing Library Repository Buenas prácticas con Angular Testing Library
- Buenas prácticas con Angular Testing Library
- Escrevendo testes eficientes de verdade no Angular
dom-testing-library
- Buenas prácticas con Angular Testing Library
-
Problems with using `useFakeTimers('modern')` in a create-react-app (CRA) project with Jest 26 and Lodash's `debounce` function
I did some digging and it looks like testing-library/dom-testing-library recommended using jest-environment-jsdom-sixteen in its release notes for v7.0.0 because CRA was using an older version of Jest which provided an older version of jsdom that was missing support for things like MutationObservers and other modern web features. However, eventually CRA was updated to use the newer version of Jest, and this made using jest-environment-jsdom-sixteen unnecessary – and in this case actually harmful as it prevented me from using the new useFakeTimers('modern') functionality. Once I removed the --env=jsdom-sixteen line from the test script in package.json everything started working as I expected.
-
How to test a select element with React Testing Library
"xByRole" is the most "correct" one, but it is also really slow if you're rendering something complex. Just a heads up. See this github issue for more info.
-
Using RTL: getByRole is quite slow on simple tests
https://github.com/testing-library/dom-testing-library/issues/820#issuecomment-726936225
What are some alternatives?
spectator - 🦊 🚀 A Powerful Tool to Simplify Your Angular Tests
em - A beautiful, minimalistic note-taking app for personal sensemaking.
ng-mocks - Angular testing library for mocking components, directives, pipes, services and facilitating TestBed setup
atl-good-testing-practices
eslint-plugin-testing-library - ESLint plugin to follow best practices and anticipate common mistakes when writing tests with Testing Library
jest - Delightful JavaScript Testing.
storybook - Storybook is a frontend workshop for building UI components and pages in isolation. Made for UI development, testing, and documentation.
user-event - 🐕 Simulate user events
common-testing-library-mistakes - Showcase for common mistakes when using testing-library
testing-library-recorder-extension - Testing Library Extension for Chrome DevTools Recorder
test-utils - Vue Test Utils for Vue 3