-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Jest test runner with 20% coverage minimum #209
Conversation
test/TransformerEsbuild.js
Outdated
@@ -0,0 +1,61 @@ | |||
// Compiles JavaScript with esbuild. | |||
// | |||
// We use this because esbuild-jest hasn't been updated in two years. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might be able to use ts-jest; it looks like ts-jest recently added support for esbuild as an experimental feature. Though I'm not clear if this support is working yet. See:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ts-jest does not support esbuild based transpilation
you could use swc-jest, we use at the company to run around 5k tests and it is pretty fast and awesome
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akprasad what did you mean by "Jest thinks everything being tested is one big file"? Can you send the coverage output you get (or perhaps change CI to print out coverage output to the console, instead of writing it out to a file)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@akprasad what did you mean by "Jest thinks everything being tested is one big file"? Can you send the coverage output you get (or perhaps change CI to print out coverage output to the console, instead of writing it out to a file)?
I mean that Jest doesn't distinguish among different source files. The output has changed a little bit since I wrote that, but here's what we get now:
with no indication of either total coverage or coverage per source file. |
I'm switching to Babel to unblock this. Tracking the esbuild work in #212. |
To make our JavaScript code more robust, switch to CLI-based testing that runs as part of our usual deploys.
Test plan: ran the tests.