is jest supported as javascript testRunner? in kot...
# javascript
c
is jest supported as javascript testRunner? in kotlinjstest i find only
useKarma
and `useMocha`methods.
🚫 1
i
KT-38244 Could you please explain use case, why you need Jest? Some feature of its configuration?
c
i have used jest on javascript and typescript projects before. I really like the snapshot feature. is there something like it available with karma or mocha?
🙏 1
to me jest seems to be the natural choice if you have a lot of unit tests for example for react components, because its faster.
🙏 1
a
jest is heavily used in the web world
i
Yes, It’s true There are a lot of reasons, why it is popular Zero-configurability, easy writing of tests, parallel testing, snapshots, and such of these reasons (e.g. writing tests and configurability) seems not so important for Kotlin/JS, because for writing
kotlin-test
may be used, and configurability should be covered with our tooling. But other features can be really interesting and important, so I want to understand for what particular cases you are interested in jest, and what problems wanted to be solved, may be some of these cases can be solved via mocha (which is popular in js world too)
a
yeah im not advocating for it based on popularity, but is there an easy way to integrate a custom test runner in kotlin js? I believe theres thishttps://github.com/Kotlin/kotlin-examples/tree/master/gradle/js-tests/jest which uses jest
i
Yes, you are partially right Kotlin-test library provide integration with different kinds of frameworks. So kotlin-test compiles into jest-compatible view. But there is another task with integration in gradle plugin for good experience. This task is not so hard, but it requires some time, and for now there is experience for js testing, so at least for now we want spent some time for tasks, which are not covered. And that’s why I want to know, what are not covering in current test experience, and what problems want to solve with jest (and of course this issues should be solved in future 🙂 )