vscode-zig
vscode-zig copied to clipboard
Run tests with build script
I want to run tests. But I get this error:
Users/tymbaca/code/zig/aoc/aoc2024/src/day3/main.zig:2:21: error: no module named 'lib' available within module test
I have "lib" import in my build.zig. How can I make so the extension will use build.zig to run that tests?
There is currently no way to do that.
It could be implemented similar to the main CodeLens by checking for a build.zig file and calling zig build test-unit -Dtest-filter=<filter>. A test-unit step and a test-filter option aren't standard conventions currently but if this feature was implemented they could be made to be.