Javascript rant
I'm trying to do something in Javascript. And modern javascript is a mess. There are multiple implementation of modules, incompatible with one another, and random libraries assume random implementation of modules.
I have an app that works locally in browser, but when I try to test each module of this app separately using jest/jasmine/mocha they randomly fail each one with it's own beautifully complex error message.
Javascript rant
Maybe my requirements are not reasonable (but OTOH every other language satisfies them).
I want compile-time support from IDE, so I use typescript, I want to load some json files and some yaml fiels (but at this point I don't want to put these files in the Internet, so it all needs to be loaded and bundled together).
Why this needs to be so fuckin complex (answer: it does not but it is).
Javascript rant
I **think** that the problem is my code is in typescript, and testing frameworks have some problems with how I use TS.
So I think I'll need to prepare special compilation code that will bundle my typescript library (with dependencies) to a single commmonjs (whaever that is) file, and then run tests against this (tests can be in JS I don't care).
The problem with that approach, that having "special build for testing" is an abomination, as you should test code you run in production.