mirror of
https://github.com/ducbao414/win32.run.git
synced 2025-12-17 09:42:50 +09:00
init the awkward code
This commit is contained in:
42
static/js/libarchive.js/test/formats/zip.test.js
Normal file
42
static/js/libarchive.js/test/formats/zip.test.js
Normal file
@@ -0,0 +1,42 @@
|
||||
/* eslint-disable no-undef */
|
||||
const {checksum} = require('../checksum');
|
||||
const {navigate,inputFile,response,setup,cleanup} = require('../testutils');
|
||||
|
||||
let browser,page;
|
||||
|
||||
beforeAll(async () => {
|
||||
let tmp = await setup();
|
||||
browser = tmp.browser;
|
||||
page = tmp.page;
|
||||
});
|
||||
|
||||
describe("Extract ZIP files with various compressions", () => {
|
||||
test("Extract ZIP deflate", async () => {
|
||||
await navigate(page);
|
||||
await inputFile('archives/zip/deflate.zip',page);
|
||||
const files = await response(page);
|
||||
expect(files).toEqual(checksum);
|
||||
}, 16000);
|
||||
/* test("Extract ZIP deflate64", async () => { // not support
|
||||
await navigate(page);
|
||||
await inputFile('archives/zip/deflate64.zip',page);
|
||||
const files = await response(page);
|
||||
expect(files).toEqual(checksum);
|
||||
}, 16000); */
|
||||
test("Extract ZIP bzip2", async () => {
|
||||
await navigate(page);
|
||||
await inputFile('archives/zip/bzip2.zip',page);
|
||||
const files = await response(page);
|
||||
expect(files).toEqual(checksum);
|
||||
}, 16000);
|
||||
test("Extract ZIP lzma", async () => {
|
||||
await navigate(page);
|
||||
await inputFile('archives/zip/lzma.zip',page);
|
||||
const files = await response(page);
|
||||
expect(files).toEqual(checksum);
|
||||
}, 16000);
|
||||
});
|
||||
|
||||
afterAll(() => {
|
||||
cleanup(browser);
|
||||
});
|
||||
Reference in New Issue
Block a user