Skip to content

Commit 9f3c0c1

Browse files
committed
fix: only posix paths added via createMockZip
1 parent 9b41af2 commit 9f3c0c1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/mock/client/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ import * as JSZip from 'jszip';
99
export async function createMockZip(entries: string[]): Promise<Buffer> {
1010
const zip = JSZip();
1111
for (const entry of entries) {
12-
zip.file(entry, '');
12+
// Ensure only posix paths are added to zip files
13+
const relPosixPath = entry.replace(/\\/g, '/');
14+
zip.file(relPosixPath, '');
1315
}
1416
return zip.generateAsync({
1517
type: 'nodebuffer',

0 commit comments

Comments
 (0)