0xProject / 0x-launch-kit-frontend

Apache License 2.0
114 stars 208 forks source link

(Feature) - Add node enviroment to test #151

Closed mariano-aguero closed 5 years ago

mariano-aguero commented 5 years ago

Add node enviroment to jest tests. Added support for some files to use jsdom.

/**
 * @jest-environment jsdom
 */

With node enviroment Screenshot_20190318_092519

With jsdom enviroment Screenshot_20190318_091941

Should we close this issue #16 ?

unjapones commented 5 years ago

This is an improvement for tests that don't use mount: writing these and using watch will be now beareble again.

We should probably aim to use shallow rendering in tests. As @mariano-aguero said, the documentation [1] states that they will definitely run faster.

[1] Disabling jsdom: https://facebook.github.io/create-react-app/docs/running-tests