Apparently, when setting up a MPP project to compile over NodeJS, the default option for testing is Mocha. Apparently, Mocha has a 2000ms default timeout which is breaking my tests.
From what I can understand, Mocha can be configured by editing the package.json file generated by Gradle, but I could not find any way to configure the content of the package.json file in my build.gradle.kts.
Am I missing something or it is a missing feature?
Another interesting thing that when I compile my test code to the regular js file and run in browser it took less than 200ms for running. But when I run tests I have an error with 2000ms timeout.
In your main project’s directory (where all the src, build.gradle.kts etc are) create new dir, call it karma.config.d inside a js file called karma.config.js with following content: