From 6dbd583ea07eb39afa863a0b9064dd384c3b90d2 Mon Sep 17 00:00:00 2001 From: Don Isaac Date: Mon, 4 Nov 2024 09:21:40 -0500 Subject: [PATCH] fix(e2e): snapshots saved in incorrect directory --- .../snapshots/semantic-coverage}/zig.snap | 0 test/utils.zig | 7 +++++-- 2 files changed, 5 insertions(+), 2 deletions(-) rename {semantic-coverage => test/snapshots/semantic-coverage}/zig.snap (100%) diff --git a/semantic-coverage/zig.snap b/test/snapshots/semantic-coverage/zig.snap similarity index 100% rename from semantic-coverage/zig.snap rename to test/snapshots/semantic-coverage/zig.snap diff --git a/test/utils.zig b/test/utils.zig index 567c388..3e89417 100644 --- a/test/utils.zig +++ b/test/utils.zig @@ -31,9 +31,12 @@ pub const TestFolders = struct { // create suite subfolder if it doesn't exist yet const cwd = fs.cwd(); - try cwd.makePath(subpath); + { + const snapshot_dir = try path.join(alloc, &[_]string{ SNAPSHOTS_DIR, subpath }); + try cwd.makePath(snapshot_dir); + } - const relative_path = try path.join(alloc, &[_]string{ subpath, name }); + const relative_path = try path.join(alloc, &[_]string{ SNAPSHOTS_DIR, subpath, name }); defer alloc.free(relative_path); return cwd.createFile(relative_path, .{}); }