Skip to content

Commit

Permalink
refactor: delete getInputFileAsZipHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
aalemayhu committed Jan 15, 2024
1 parent 6fffddb commit 2e2b308
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 14 deletions.
11 changes: 0 additions & 11 deletions src/test/helpers/getInputFileAsZipHandler.ts

This file was deleted.

12 changes: 9 additions & 3 deletions src/test/lib.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
import path from "path";
import fs from "fs";

import {beforeAll, expect, test} from "vitest";
import {expect, test} from "vitest";

import SQLHandler from "../lib/handlers/SQLHandler";
import {ZipHandler} from "../lib/handlers/ZipHandler";
import {getInputFileAsZipHandler} from "./helpers/getInputFileAsZipHandler";
import {readDatabaseFrom} from "../lib/readDatabaseFrom";

async function getInputFileAsZipHandler(apkg: string) {
const filePath = path.join(__dirname, `./artifacts/${apkg}`);
const data = fs.readFileSync(filePath);
const zip = new ZipHandler();
await zip.extractFilesInPlace(data);
return zip;
}


test("detected files", async () => {
let zip = await getInputFileAsZipHandler("HTML TEST.apkg");
Expand Down

0 comments on commit 2e2b308

Please sign in to comment.