Skip to content

Commit f1a0cd4

Browse files
committed
fixed test options
1 parent 9447097 commit f1a0cd4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
const std = @import("std");
22

33
pub fn build(b: *std.Build) void {
4-
_ = b.addModule("zig-jwt", .{
5-
.root_source_file = b.path("./src/jwt.zig"),
4+
const mod = b.addModule("zig-jwt", .{
5+
.root_source_file = b.path("src/jwt.zig"),
66
});
77

88
// -Dtest-filter="..."
99
const test_filter = b.option([]const []const u8, "test-filter", "Filter for tests to run");
1010

1111
// zig build unit_test
1212
const unit_tests = b.addTest(.{
13-
.root_source_file = b.path("./src/jwt.zig"),
13+
.root_module = mod,
1414
});
1515
if (test_filter) |t| unit_tests.filters = t;
1616

0 commit comments

Comments
 (0)