I wrote front-end testing code less frequently. I heard a lot of frameworks used by my colleagues, like
Jest. you name it.
Why so much complex?
In the Java ecosystem, we have
JUnit for the test runner, it provides test suites and all kinds of
assert expressions. If we need to mock some dependencies, we use
Mokito or others like. That’s enough.
So the following I give a one sentence introduction for each of them.
- Chai: a BDD / TDD assertion library for node and the browser
So obviously, Jasmine/Mocha/Jest can be of the similar role with some overlays.
Look at them a bit more
Jasmine provides with everything you are expected to need for your tests: a running environment, structure, reporting, assertion, and mocking tools. Has widespread Angular support.
One word: ready-to-go
Mocha is usually used with third party assertion, mocking, and spying tools (usually Enzyme and Chai).
One word: flexible and extensible
Like Jasmine, everything is there.
One word: performance