Skip to content

Commit

Permalink
test: generateResourcesMapping filters resources without file extension
Browse files Browse the repository at this point in the history
  • Loading branch information
seia-soto committed Aug 6, 2024
1 parent fb92c42 commit 5690b44
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/unit/converters/helpers.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { describe, it, expect } from "bun:test";

import { normalizeFilter, normalizeRule } from "../../../src/converters/helpers.js";
import { generateResourcesMapping, normalizeFilter, normalizeRule } from "../../../src/converters/helpers.js";

describe("normalizeFilter", () => {
it("format params", () => {
Expand Down Expand Up @@ -122,3 +122,13 @@ describe('normalizeRule', () => {
});
});
});

describe('generateResourcesMapping', () => {
const mapping = generateResourcesMapping();

it('filters resources without file extension', () => {
for (const destination of mapping.values()) {
expect(destination.match(/\w+\.\w+|empty/)).not.toBe(null);
}
});
});

0 comments on commit 5690b44

Please sign in to comment.