Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
closes #117
I tried to get ts-node + esm working for quite a bit. I'm actually unsure if it was ever working, esp. given the comment (deleted below) alluding to the markdown tests never running. I went the esbuild route in frustration, because I was pretty sure I could at least get it to work. While there's only a couple test files, its still shockingly fast ~1s to build each test bundle and run them, including the initial command invocation. The main draw back currently is there's no clear distinction between node and browser; anything even pulling in the window object may fail. But basic unit tests work, and being able to write them again is refreshing.
Also, node has its own testing library (
import { test } from 'node:test'
). It seems to require being run in esm mode. I briefly toyed with moving more of the project to ESM, but hit a few snags and maybe its a bigger change, will track in a follow up and include notes there. Ultimately getting to node testing is exciting, because I don't use many features from mocha / chai, and it will be even fewer dependencies to maintain without sacrificing any functionality.