is there a way to use jest as test runner instead ...
# javascript
c
is there a way to use jest as test runner instead of karma as descriped here https://kotlinlang.org/docs/reference/js-project-setup.html#configuring-test-task? what i’m trying to archive is to have unit tests that don’t start a browser (unlike the karma tests) and testing my react components with enzyme. is an example regarding react with enyme available somewhere? or are their other hints how to archive testing that you are just to when comming from typescript (like react testing with jest and enyme)
Is you want tests without brwoser, you can configure enzyme with mocha: https://airbnb.io/enzyme/docs/guides/mocha.html Mocha is used in Gradle Kotlin/JS plugin to running tests in NodeJS, so you should write
nodejs { }
instead of
browser
. Does it work for you?
c
Thx for response, I'll give it a try when I'm back home from the kotlin conf :)