-
Notifications
You must be signed in to change notification settings - Fork 641
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
Convert to bun:test for our tests, remove codecov #2149
Conversation
I was able to get this working with a little bit of bash scripting. I don't love it, but since the Bun test runner doesn't behave precisely like The major downside right now is that coverage is no longer correctly generated. I will see if I can fix that up. Bun also shipped support for |
c53f899
to
9298488
Compare
I added the specific I also removed |
432b9c3
to
f7e47ea
Compare
* chore: include bun types for tests, fix ts config * test: fix expected literal for bun runtime in test * test: fix circular tests * test: bump snapshot for bun testing * test: fix Frozen to expect Bun errors rather than Node * test: remove inline snapshot error assertions for bun * chore: remove a comment * test: bump reference-custom snapshots for Bun * chore: remove unused import * test: use toJSON to assert equality on proxy object * test: migrate action tracking middleware2 test to bun * test: update async test for bun test runner * test: fix object-node test for bun test runner * chore: remove Jest and related packages * test: import bun:test, fix type errors * test: import bun test * test: import bun test helpers to array test * test: add bun test imports to async test * test: add bun test imports to boolean * test: add bun test imports to boxes-store * test: add bun imports, fix errors to custom-type test * test: import bun test helpers, fix erros in date test * test: add bun test imports to deprecated test * test: add bun test imports to enum test, fix errors * test: use bun test imports, fix errors in env test * test: use bun test imports for frozen test * test: import bun test, fix hooks * test: import bun test utilities, fix errors in identifier * test: use bun imports for jsonpatch test * test: use bun test imports, fix errors in late test * test: import bun test helpers to lazy * test: import bun test helpers, fix errors in literal test * test: use bun test imports, fix ts error in map test * test: import bun test helpers, fix errors in model test * test: use bun test imports for name test * test: import bun test helpers to node test, fix issues * test: import bun test helpers, fix issues in number test * test: add bun test helpers and fix ts issues in object test * test: use bun test imports in optimizations test * test: import bun test helpers, fix ts issues with optional extension * test: import bun test utilities to optional test * test: import bun test utiltities to parent properties * test: import bun test utilties to pointer * test: ipmort bun test helpers to primitives * test: import bun test helpers to protect test * test: add bun test imports for recordPatches * test: import bun test utilities to reference-custom * test: use bun test utilities, fix undefined issues * test: use bun test helpers in reference test * test: use bun test utilities in refinement test * test: use bun test helpers for reflection test * test: use bun test utilities in snapshotProcessor * test: import bun test utilities and fix tyeps for string test * test: use bun test helpers in this test * test: use bun test utilities, fix ts error in type system test * test: use bun test helpers, fix ts errors * test: add bun test helpers to volatile test * test: core tests work with skips * test: skip perf tests temporarily * test: simplify package.json testing scripts for bun * chore: simplify bun testing in CI * chore: remove codecov step for now * spike: add a utility to reset action id for tests - should think about this more * test: fix ~100 skipped tests * test: narrow down to one problematic test in model * test: only skip 47 tests now * spike: try runnig all tests on their own, almost works * test: get bun test:all to work * test: no mor eneed for resetActionId * test: bring back expect.assertions * test: remove codecov * fix: missing fail declaration * test: add back specific error message tests * test: ensure bun tests scripts exit when failing
What does this PR do and why?
This PR will convert our Jest test to bun test. This offers us a few advantages:
ts-jest
ts-jest
andjest
itself, we reduce ourdevDependencies
as wellMstError
from a rebaseSteps to validate locally
bun install
bun test:all
- tests should pass.time bun test:all
, you can measure its runtime. Here's what I got on my 2020 Macbook Pro with Intel i7/32 GB RAM:Compare this to the
yarn test:all
run inmaster
, which reports:Ran it with
time yarn test:all
and got slightly better results but with a lot more CPU usage: