Tests refactoring checklist
See original GitHub issueInitially, I created a project, but then I realised that it’s not commentable so maybe an umbrella issue with checklist would be more useful, so I duplicate it as such.
@joshwcomeau has mentioned that he would like to have some improvements. So I decided to make some kind of checklist for what has to be done. Feel free to add anything that you think would be nice to do.
Definitely needed:
- Isolate the tests from each other, i.e. make all the setup before each test so that the state is reset #166
- Add tests for appear / enter / leave animations
- Do something with tests stability (see false positives like that: https://travis-ci.org/joshwcomeau/react-flip-move/jobs/236306660) #175
- Add tests for runtime props conversion and checks #174
- Use sandboxed sinon for easier resetting/restoring
Maybe needed:
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to refactor
Checklist of refactoring done right way. The code should become cleaner. ... There are two cases when tests can break down after refactoring:....
Read more >A red-green-refactor checklist - ploeh blog
Write a failing test. Did you run the test? Did it fail? Did it fail because of an assertion? · Make all tests...
Read more >Code Refactoring: What You Need to Know About It
Understanding Code Refactoring: A Tester's Perspective. The term 'Refactoring' is mainly used to indicate required code cleanup/redesign.
Read more >Refactoring Code Checklist - A Fumbling in Programming
Can the code be refactored? Do you need a seam? · Create Tests · Start with the deepest branch to shortest branch ·...
Read more >A four-point checklist to factor in while refactoring applications ...
Validating the new version of an application requires running end-to-end tests and the entire regression test suite to ensure new changes do not ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

regarding " Use sandboxed sinon for easier resetting/restoring", have you given jests mock functionality a look? we’ve replaced also most all of our sandboxes with the mocking toolset provided by jest.
regarding “Add tests for appear / enter / leave animations” we could look for classes mapped to animation (“–anim-start” etc.) maybe? i mean, short of that you need something like cypress.io for actual e2e testing i wager.
adding tests for high pressure situations (500 incoming elements, 200 leaving, 600incoming all incoming in short distance). it’ll most likely mess up sorting. we’d then have a red to work up from. i’ll probably build something in that regard this weekend
Yeah, maybe if CI only runs at 1-2fps, it could explain it.