Skip to content

Commit 5e6c0fd

Browse files
committed
Fix attw on windows
1 parent 86d4dad commit 5e6c0fd

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

packages/resolution/attw.test.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,19 @@ describe("Are The Types Wrong (attw) tests", () => {
1616
return;
1717
}
1818

19-
const result = await execa("pnpm", ["attw", "--pack", "node_modules/zod", "--format", "ascii"], {
19+
// Check if attw is available before running the test
20+
try {
21+
await execa("pnpm", ["attw", "--version"], {
22+
cwd: __dirname,
23+
timeout: 5000,
24+
});
25+
} catch (error) {
26+
console.warn("attw not available, skipping test");
27+
return;
28+
}
29+
30+
const zodPackagePath = path.join(__dirname, "node_modules", "zod");
31+
const result = await execa("pnpm", ["attw", "--pack", zodPackagePath, "--format", "ascii"], {
2032
cwd: __dirname,
2133
reject: false, // Don't throw on non-zero exit codes
2234
});

0 commit comments

Comments
 (0)