build: test/build in CI (#49)

This commit is contained in:
Samuel Attard 2025-07-06 21:01:37 -07:00 • committed by GitHub
commit 85de8638db
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,15 +73,10 @@ temp/`;
});
it("should return empty array if file cannot be read", () => {
const content = "*.log";
fs.writeFileSync(dxtIgnorePath, content);
fs.chmodSync(dxtIgnorePath, 0); // Make file unreadable
fs.mkdirSync(dxtIgnorePath); // Make a dir so readFile fails
const patterns = readDxtIgnorePatterns(tempDir);
expect(patterns).toEqual([]);
// Restore permissions for cleanup
fs.chmodSync(dxtIgnorePath, 0o644);
});
});