Skip to content

Commit

Permalink
Add test for a issue
Browse files Browse the repository at this point in the history
  • Loading branch information
5saviahv committed Jun 16, 2024
1 parent 56f3aae commit 3796198
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/mocha.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,21 @@ describe("adm-zip", () => {
expect(zip1Entries).to.deep.equal(["windows/system32/drivers/etc/hosts.txt", "system32/drivers/etc/hosts.txt", "drivers/etc/hosts.txt", "hosts.txt"]);
});

// Issue 64
it("zip.writeZip - multiple times", () => {
const zip = new Zip("./test/assets/ultra.zip");
const fileName = pth.resolve(destination, "writezip");

for (let i = 0; i < 5; i++) zip.writeZip(`${fileName}.${i}.zip`);

const expected_list = ["./test/xxx/writezip.0.zip", "./test/xxx/writezip.1.zip", "./test/xxx/writezip.2.zip", "./test/xxx/writezip.3.zip", "./test/xxx/writezip.4.zip"].map(
pth.normalize
);

const files = walk(destination);
expect(files.sort()).to.deep.equal(expected_list);
});

/*
it("repro: symlink", () => {
const zip = new Zip("./test/assets/symlink.zip");
Expand Down

0 comments on commit 3796198

Please sign in to comment.