Pentazemin icon indicating copy to clipboard operation
Pentazemin copied to clipboard

Move to jest

Open lmiller1990 opened this issue 7 years ago • 1 comments

Hi,

I would like to move to Jest from karma-mocha-chai for unit tests. You can still use power_assert with jest.

The benefits of Jest:

  • watch mode (only run tests related to your code change)
  • excellent mock/stubs (very easy to mock nedb, so testing will be easy)

Edit: I forked it and made the changes. See https://github.com/lmiller1990/Pentazemin

To try it out: yarn install

yarn jest --runTestsByPath test/unit/specs/store/modules/Archives.spec.js to run the test.

See the test and renderer/API/mocks folder for some comments explaining how it works.

If you like this, we can move the existing tests to Jest (not that much work) and then merge to master.

lmiller1990 avatar Nov 08 '17 14:11 lmiller1990

Thank you for the message. I'm interested in Jest with Power-assert. Actually I have to write tests more and more, they are not enough at the moment.

I'll try it! thanks! 👍

AquiTCD avatar Nov 12 '17 10:11 AquiTCD