Skip to content

Commit bc8b5a4

Browse files
committed
format files
1 parent fbfba37 commit bc8b5a4

3 files changed

Lines changed: 39 additions & 15 deletions

File tree

test/file_structure.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ describe("file structure", () => {
181181
`same output between native and node zip with absolute file paths: ${args}`,
182182
{ skip: !hasNativeZip },
183183
async () => {
184-
child_process.execSync(`node ${cli} --force=node ${destination} ${args}`);
184+
child_process.execSync(
185+
`node ${cli} --force=node ${destination} ${args}`
186+
);
185187

186188
await unzip(destination, tmpdir);
187189
const nodeStructure = getStructure(tmpdir);

test/old.test.js

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,14 @@ describe("bestzip", function () {
4141
afterEach(async function () {
4242
try {
4343
await fs.rm(extractFolderPath, { recursive: true, force: true });
44-
} catch {}
44+
} catch {
45+
// ignore
46+
}
4547
try {
4648
await fs.rm(destinationFilePath, { force: true });
47-
} catch {}
49+
} catch {
50+
// ignore
51+
}
4852
});
4953

5054
it("should create archive", async function () {
@@ -82,11 +86,18 @@ describe("bestzip", function () {
8286

8387
afterEach(async function () {
8488
try {
85-
await fs.rm(validArchiveExtractFolder, { recursive: true, force: true });
86-
} catch {}
89+
await fs.rm(validArchiveExtractFolder, {
90+
recursive: true,
91+
force: true,
92+
});
93+
} catch {
94+
// ignore
95+
}
8796
try {
8897
await fs.rm(validArchiveFilePath, { force: true });
89-
} catch {}
98+
} catch {
99+
// ignore
100+
}
90101
});
91102

92103
it("should contain valid data after unarchive", async function () {
@@ -141,10 +152,14 @@ describe("bestzip", function () {
141152
afterEach(async function () {
142153
try {
143154
await fs.rm(extractFolderPath, { recursive: true, force: true });
144-
} catch {}
155+
} catch {
156+
// ignore
157+
}
145158
try {
146159
await fs.rm(destinationFilePath, { force: true });
147-
} catch {}
160+
} catch {
161+
// ignore
162+
}
148163
});
149164

150165
it("should create archive", async function () {
@@ -203,11 +218,18 @@ describe("bestzip", function () {
203218

204219
afterEach(async function () {
205220
try {
206-
await fs.rm(validArchiveExtractFolder, { recursive: true, force: true });
207-
} catch {}
221+
await fs.rm(validArchiveExtractFolder, {
222+
recursive: true,
223+
force: true,
224+
});
225+
} catch {
226+
// ignore
227+
}
208228
try {
209229
await fs.rm(validArchiveFilePath, { force: true });
210-
} catch {}
230+
} catch {
231+
// ignore
232+
}
211233
});
212234

213235
it("should contain valid data after unarchive", async function () {

test/perf.test.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ describe("Performance", () => {
1212

1313
const getPerf = async (zipFn) => {
1414
const start = Date.now();
15-
await zipFn({
16-
cwd: path.join(import.meta.dirname, "../"),
17-
source: "*",
18-
destination
15+
await zipFn({
16+
cwd: path.join(import.meta.dirname, "../"),
17+
source: "*",
18+
destination,
1919
});
2020
const duration = Date.now() - start;
2121

0 commit comments

Comments
 (0)