I’m close to being ready to publish a small library, but I don’t want to do so until I have tests and god these ones are boring to write 😂
The library uses randomness heavily so there’s not an easy way to write high-level tests for most things, and property-based tests don’t really make sense here. So I’m doing what I can to write tests for all of the internal helper functions, which just, ugh.
The next fun thing will be figuring out how to properly publish an npm package such that it can be used by both ESM and commonjs projects. I found a guide but it doesn’t seem to play well with running TypeScript natively when developing. I think this stuff working in a straightforward way would have honestly been more surprising than the alternative.