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
And the worst part is:
1) This is a hobby project, so when I have time to work on in next time, I will forget most of the details.
2) Instead of doing what I want, I wasted whole day on fucking with javascript (And this project will be running in browsers so I need to use JS);
3) When I finish it half of the project will be obsolete, as Javascript will be reinvented anew.
Javascript rant
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.