Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismclarke committed Sep 20, 2024
1 parent 4da6299 commit b2f6648
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ describe("App Data Converter", () => {
const outputFolders = readdirSync(paths.outputFolder);
expect(outputFolders).toEqual(["data_list", "data_pipe", "template"]);
});
it("Generates summary conversion reports", async () => {
await converter.run();
const reports = readdirSync(paths.reportsFolder);
expect(reports).toEqual(["summary.json", "summary.md"]);
});
it("Supports input from multiple source folders", async () => {
const multipleSourceConverter = new AppDataConverter({
...paths,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,16 @@ describe("Asset Summary Report", () => {
it("Enumerates assets from template and data_lists", async () => {
const { asset_summary } = await reporter.process(MOCK_WORKBOOK_DATA);
expect(asset_summary.data).toEqual([
{ path: "missing_audio.mp3", count: 1, missing: true },
{ path: "mock_audio.mp3", count: 1 },
{ path: "path/to/mock_image.jpg", count: 2 },
]);
});

it("identifies missing assets", async () => {
const { assets_missing } = await reporter.process(MOCK_WORKBOOK_DATA);
expect(assets_missing.data).toEqual([{ path: "missing_audio.mp3", count: 1, missing: true }]);
});

it("identifies unused assets", async () => {
const { assets_unused } = await reporter.process(MOCK_WORKBOOK_DATA);
expect(assets_unused.data).toEqual([{ path: "unused_asset.png", size_kb: 512 }]);
Expand Down

0 comments on commit b2f6648

Please sign in to comment.