mardi 3 avril 2018

Is there any benefit to use node environment in jest for helper methods?

Jest gives possibility to setup environments. Default environment is jsdom. I use jsdom environment to run tests for my react components.

But also I have tests for my helper functions. These functions are used by my components but they don't require DOM.

So, is there some benefits to use node environment for such cases(maybe tests run faster) or something else?

Aucun commentaire:

Enregistrer un commentaire