fix(tests): wire module tests into zig build test - #9
Open
addadi wants to merge 1 commit into
Open
Conversation
The test step compiles only src/main.zig, which never imports the other modules' test declarations, so 'zig build test' silently runs 0 tests. Add a root test block referencing store/api/domain/config. Fixes latent compile errors in those module tests left by the zig 0.16 migration: std.testing.tmpDir Dir must be wrapped via std_compat.fs.Dir.wrap for writeFile/realpathAlloc/makePath, and ObjectMap.deinit now requires an allocator argument. Also fixes arena leaks in three api.zig auth tests (Context.allocator now backed by a per-test ArenaAllocator) so the suite passes cleanly under the testing allocator. After this change: 18 unit tests run (previously 0).
This was referenced Aug 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #6
The test step roots at
src/main.zig, which never imports the other modules' test declarations — sozig build testsilently runs 0 tests (see #6 for 1-command repro).Changes:
test {}block inmain.zigreferencingstore/api/domain/configstd_compat.fs.Dir.wrapfortmpDirwriteFile/realpathAlloc/makePath,ObjectMap.deinit(alloc)api.zigauth testsResult: 18 unit tests run (previously 0).
zig build test,zig build, and full e2e (tests/test_e2e.sh, 96 passed) verified locally.