Use vitest or similar for tests
While trying to add a test for #252 I've found it pretty difficult to work with the current (a bit custom) test setup. Especially using different environments (node vs browser) and testing by importing typescript files could simplify the setup IMO. Would you be interested in migrating to something like it?
https://www.npmjs.com/package/web-worker seems to be an option to test web-workers as common envs like jsdom and happy-dom do not support web-workers yet. However its kinda testing the mock as web-worker is just using the node worker underneath again.
Hey @anbraten, thanks for suggesting this.
They current testing setup is based on the somewhat specific needs of ZenFS (e.g. testing multiple configurations with the same suites). Additionally, the built-in node:test runner is used to avoid the need for more dependencies.
While I do want to run tests in browsers, I don't think vitest would be the best fit— in a different project I had to fight with the configuration for hours to fix it bundling things it shouldn't have.
Ideally, there would be a way to (easily) add testing in browsers to the existing testing framework.