mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
### What does this PR do? Lets us write and run unit tests directly in Zig. Running Zig unit tests in CI is blocked by https://github.com/ziglang/zig/issues/23281. We can un-comment relevant code once this is fixed. #### Workflow > I'll finish writing this up later, but some initial points are below. > Tl;Dr: `bun build:test` Test binaries can be made for any kind of build. They are called `<bun>-test` and live next to their corresponding `bun` bin. For example, debug tests compile to `build/debug/bun-debug-test`. Test binaries re-use most cmake/zig build steps from normal bun binaries, so building one after a normal bun build is pretty fast. ### How did you verify your code works? I tested that my tests run tests.