r/reactjs •

[deleted by user]

[deleted] — view deleted post

0 Upvotes

255 comments sorted by

View all comments

1

u/AviatingFotographer Sep 14 '20

Jest requires using require() for imports but all my functions are exported using export const function = () => ..., so how would I use Jest with ES6 import/exports?

0

u/[deleted] Sep 14 '20

[deleted] — view deleted comment

1

u/AviatingFotographer Sep 14 '20

Jest tests are in Javascript, I don't have a tsconfig.json file.

Edit: tests work now, error must've been from something else.