dom-testing-library
javascript-testing-best-practices
dom-testing-library | javascript-testing-best-practices | |
---|---|---|
4 | 16 | |
3,233 | 23,552 | |
0.4% | - | |
6.5 | 3.1 | |
4 days ago | 24 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.
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
javascript-testing-best-practices
- Comprehensive and exhaustive JS & Node.js testing best practices (July 2023)
- JavaScript and Node.js testing best practices (July 2023)
-
Awesome Github Repos to Master JAVASCRIPT
π You want to take your JS testing skills to the next level, here is a nice repo -> javascript-testing-best-practices
- 10 GitHub repositories you must know as a JavaScript developer
- 10 Must-Know GitHub Repositories for JavaScript Developers
- 10 GitHub Repositories You Should Know as a JavaScript Developer
-
React Testing
Surprised nobody referred this
-
[AskJS] Recommend me a good resource to learn in-depth/advanced about testing (Jest, RTL, Enzyme)
Yoni Golberg's JavaScript Testing best practices guide is always a good resource to consult, for both beginners and experienced developers: https://github.com/goldbergyoni/javascript-testing-best-practices
-
Hyperstack - a new open source Node.js web framework with everything included
I really like how testing is done in Rails. Why did you choose the snapshots approach? I never have seen it for this purpose, they say it's bad practice even for the frontend (check testing practices for node btw), so, why?
-
Good (quick) Resources to Become a Better Developer
JavaScript Testing Best Practices, by Yoni Goldberg is a GitHub repository. It gives good practices about testing.
What are some alternatives?
em - A beautiful, minimalistic note-taking app for personal sensemaking.
synpress - Synpress is e2e testing framework based on Cypress.io and playwright with support for metamask.
atl-good-testing-practices
svelte-jester - A Jest transformer for Svelte - compile your components before importing them into tests.
jest - Delightful JavaScript Testing.
ng-mocks - Angular testing library for mocking components, directives, pipes, services and facilitating TestBed setup
chai-json-validation - Chai Plugin for validation JSON schema
nodebestpractices - :white_check_mark: The Node.js best practices list (February 2024)
testcontainers-node - Testcontainers is a NodeJS library that supports tests, providing lightweight, throwaway instances of common databases, Selenium web browsers, or anything else that can run in a Docker container.
front-end-interview-handbook - β‘οΈ Front End interview preparation materials for busy engineers
xv - π ββοΈ βοΈ fastest test runner
node_pg_reference_app - Node.js reference CRUD application using node-postgres and PostgresSQL