https://kotlinlang.org logo
#javascript
Title
# javascript
g

Gintautas G

03/02/2023, 9:34 AM
Perhaps someone could suggest a tool for mocking in Kotlin/JS project?
b

Big Chungus

03/02/2023, 9:40 AM
No reflection and as such no mocking in js. Mockk has some limited support, but that's very limited by itself. Your best bet is using fakes instead. There are some ksp based generators that can generate fakes for your interfaces
Here's one implementation("tech.antibytes.kmockkmock0.3.0-rc05")
You can find more by going to kamp.petuska.dev filtering by js target and searching by "mock" term.
g

Gintautas G

03/02/2023, 10:00 AM
Okay, thanks! I will try out.
6 Views