Skip to content

Commit

Permalink
fix: change zip library to fix garbled extract file under node 20 (#707)
Browse files Browse the repository at this point in the history
* fix: change zip library to fix garbled extract file under node 20

fixes: #689

* test: added test for archive file with larger content
  • Loading branch information
jackie-linz authored Apr 9, 2024
1 parent 428cfb3 commit 452eec1
Show file tree
Hide file tree
Showing 6 changed files with 116 additions and 204 deletions.
6 changes: 6 additions & 0 deletions __tests__/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,12 @@ test("Download all archive files from public repo", async () => {
expect(
fs.existsSync(path.join(downloadSettings.outFilePath, "test-3.txt"))
).toBe(true)

const test4actual = path.join(downloadSettings.outFilePath, "test-4.txt")
expect(fs.existsSync(test4actual)).toBe(true)
expect(fs.readFileSync(test4actual, {encoding: "utf-8"}).toString()).toBe(
readFromFile("assets/archive-example-test-4.txt")
)
}, 10000)

test("Fail when a release with no assets are obtained", async () => {
Expand Down
71 changes: 71 additions & 0 deletions __tests__/resource/assets/archive-example-test-4.txt

Large diffs are not rendered by default.

Binary file modified __tests__/resource/assets/archive-example.zip
Binary file not shown.
Loading

0 comments on commit 452eec1

Please sign in to comment.