mirror of
https://github.com/codedread/bitjs
synced 2025-10-03 09:39:16 +02:00
Only have a unit test for DEFLATE when the runtime supports CompressionStream('deflate-raw')
This commit is contained in:
parent
6c19e3a908
commit
4fc5ce450c
1 changed files with 9 additions and 7 deletions
|
@ -62,9 +62,11 @@ describe('bitjs.archive.compress', () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('zipper works for DEFLATE, where supported', async () => {
|
|
||||||
const files = new Map(inputFileInfos);
|
|
||||||
try {
|
try {
|
||||||
|
new CompressionStream('deflate-raw');
|
||||||
|
|
||||||
|
it('zipper works for DEFLATE, where deflate-raw is supported', async () => {
|
||||||
|
const files = new Map(inputFileInfos);
|
||||||
const zipper = new Zipper({zipCompressionMethod: ZipCompressionMethod.DEFLATE});
|
const zipper = new Zipper({zipCompressionMethod: ZipCompressionMethod.DEFLATE});
|
||||||
const byteArray = await zipper.start(Array.from(files.values()), true);
|
const byteArray = await zipper.start(Array.from(files.values()), true);
|
||||||
|
|
||||||
|
@ -82,8 +84,8 @@ describe('bitjs.archive.compress', () => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
await unarchiver.start();
|
await unarchiver.start();
|
||||||
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// Do nothing. This runtime did not support DEFLATE. (Node < 21.2.0)
|
// Do nothing. This runtime did not support DEFLATE. (Node < 21.2.0)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue