We’ve already discussed with you that testing React component using Jest is not so difficult. And you can find that there is actually nothing that can be solved. The main thing is to practice…and read our blog of course. So, let’s look closer to another interesting tool. Majestic is a GUI for Jest.
So, what are these interesting features we promised you? With Majestic you can:
- run all the tests or a single file
- toggle watch mode
- update snapshots
- examine test failures as they happen
- use console.log() to the UI for debugging
- built coverage report
- search tests
- work with flow and typescript projects
- work with Create react app
You can configure Majestic by adding
majestic key to
And that’s are arguments that have a magic effect. With their help everything is possible. Ok, we meant these things:
--port – this port if available, else Majestic will pick another free port.
--debug – helps with debugging.
--noOpen – prevents from automatically opening the UI url in the browser.
--version – prints the version of Majestic and will exit.
Have a look at it here.
Here in Syndicode, we have told you many times that Vue has a great future. First of all, its benefits make it easier to use. Secondly, it has Jest, and Jest makes testing Vue easier. And to read all that is another easy thing you can do. Enjoy!