Anyone know how to go about unit testing an application that is made up of:
- Electron
- Node
- React
- Typescript

(React using Typescript of course).

Electron has its own framework (Spectron), people seem to use Mocha with Node, React has its own tools like React testing library (and testing UI components will probably end me) and Typescript seems to play best with Jest - but a special Typescript flavour of Jest called ts-jest is preferable because the only other option is having Babel and its Typescript support that doesn't type check.

I want to beg for the sweet release of death.

  • 1
    Pinning since I want to know people actually test a react transaction to web api, is it by using test database?
  • 2
    I usually just use Jest for everything.
  • 1
    @devTea OP is asking for unit testing, you want end to end testing. Unit testing is without depending on databases and servers and such.
  • 2
    @Codex404 ah never knew that term, guess I can just google it myself now
Add Comment