diff --git a/src/basic.test.ts b/src/basic.test.ts index 3857d0c..754fc69 100644 --- a/src/basic.test.ts +++ b/src/basic.test.ts @@ -3,7 +3,7 @@ import { describe, expect, test, afterEach } from "vitest"; // @ts-expect-error No typings available import { fasFlag, fasInfo } from "@cweili/fa-test-util"; import { render, screen, cleanup } from "@testing-library/svelte"; -import Fa from "./lib/fa.svelte"; +import Fa from "./lib"; function mountFa(props: Partial>) { cleanup(); @@ -125,7 +125,7 @@ describe("size", () => { test("scale", async () => { mountFa({ - scale: 0.5, + scale: "0.5", }); let transform = getFa().querySelector("g > g")?.getAttribute("transform"); expect(transform).toContain("scale(0.5,0.5)"); @@ -139,7 +139,8 @@ test("scale", async () => { test("translate", async () => { mountFa({ - translateX: 1, + translateX: "1", + translateY: "0", }); let transform = getFa().querySelector("g > g")?.getAttribute("transform"); expect(transform).toContain("translate(512,0)"); diff --git a/src/duotone.test.ts b/src/duotone.test.ts index 738f85e..39f7e5b 100644 --- a/src/duotone.test.ts +++ b/src/duotone.test.ts @@ -3,7 +3,7 @@ import { expect, test, afterEach } from "vitest"; // @ts-expect-error No typings available import { fasFlag, fadFlag, fadInfo } from "@cweili/fa-test-util"; import { render, screen, cleanup } from "@testing-library/svelte"; -import Fa from "./lib/fa.svelte"; +import Fa from "./lib"; function mountFa(props: Partial>) { cleanup(); diff --git a/src/layers.test.ts b/src/layers.test.ts index a1f978b..f022dc2 100644 --- a/src/layers.test.ts +++ b/src/layers.test.ts @@ -1,9 +1,12 @@ import { describe, expect, test, afterEach } from "vitest"; import { render, screen, cleanup, configure } from "@testing-library/svelte"; -import FaLayers from "./lib/fa-layers.svelte"; -import FaLayersText from "./lib/fa-layers-text.svelte"; import type { ComponentProps } from "svelte"; +import { + FaLayers, + FaLayersText, +} from "./lib"; + configure({ testIdAttribute: "id" }); afterEach(cleanup);