Skip to content

Conversation

violetadev
Copy link
Contributor

@violetadev violetadev commented Aug 1, 2024

📓 Referenced Issue

ℹ️ About the PR

This PR does the following:

  • extracts jest config from the package.json
  • adds global mocks for electron and intersection obserer so components can be tested more easily.
  • adds the command yarn test:watch yourfile.test.tsx -> it watches the test so when you save it runs it again automatically
  • adds the command yarn test:coverage yourfolder/ -> it checks what lines are lacking test coverage in which files
  • adds missing tests for the settings import/export feature, button and some other utils

✨ Pull Request

Extract jest config and add it to the script. It also adds yarn test:watch to watch files while developing tests.
Usage: yarn test:watch desktop-app/src/renderer/components/DeviceManager/PreviewSuites/ManageSuitesTool/utils.test.ts

🖼️ Testing Scenarios / Screenshots

Screenshot 2024-08-03 at 15 10 57

@violetadev violetadev force-pushed the violetadev/testsetup branch from db339fd to 49c4050 Compare August 1, 2024 20:36
@violetadev violetadev marked this pull request as draft August 1, 2024 20:45
@violetadev violetadev marked this pull request as ready for review August 3, 2024 13:03
@violetadev violetadev force-pushed the violetadev/testsetup branch from 85bab0f to f44028b Compare August 3, 2024 13:06
@violetadev violetadev force-pushed the violetadev/testsetup branch from f44028b to cada3b5 Compare August 3, 2024 13:10
@violetadev violetadev changed the title extract config to file [Tests] extract jest config to file, add jest commands, add mocks and add missing tests Aug 3, 2024
Copy link
Collaborator

@manojVivek manojVivek left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for following this up!

@manojVivek manojVivek merged commit 1d0b031 into responsively-org:main Aug 5, 2024
4 checks passed
@violetadev
Copy link
Contributor Author

@all-contributors Please add @violetadev for test.

Copy link
Contributor

@violetadev

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

@violetadev violetadev deleted the violetadev/testsetup branch August 10, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants