nulltickets icon indicating copy to clipboard operation
nulltickets copied to clipboard

zig build test silently runs 0 unit tests

Open addadi opened this issue 3 months ago • 0 comments

Bug

zig build test on current main compiles and exits 0 without running any tests.

Repro

git clone https://github.com/nullclaw/nulltickets && cd nulltickets
zig build test --summary all
# Build Summary: 5/5 steps succeeded
# test success
# +- run test success 11ms   <- no test count, no tests executed

Cause

  • build.zig test step roots at src/main.zig only.
  • src/main.zig has no test { ... } block referencing the other modules, so test declarations in store.zig, api.zig, domain.zig, config.zig are never pulled into the test build.
  • Additionally those module tests no longer compile since the zig 0.16 migration (PR #2): std.testing.tmpDir dirs need std_compat.fs.Dir.wrap for writeFile/realpathAlloc/makePath, and ObjectMap.deinit now takes an allocator. Three api.zig auth tests also leak (need an arena for Context.allocator).

Fix

Add root test block + compat/arena fixes → 18 unit tests run.

PR incoming: fix/wire-module-tests.

addadi avatar Aug 22 '26 14:08 addadi