(content)
| 88 | |
| 89 | describe("verifyChecksum", () => { |
| 90 | function makeTmpFile(content) { |
| 91 | const dir = fs.mkdtempSync(path.join(os.tmpdir(), "checksum-test-")); |
| 92 | const filePath = path.join(dir, "archive.tar.gz"); |
| 93 | fs.writeFileSync(filePath, content); |
| 94 | return filePath; |
| 95 | } |
| 96 | |
| 97 | function sha256(content) { |
| 98 | return crypto.createHash("sha256").update(content).digest("hex"); |