Skip to content

Commit

Permalink
explorer: update AnchorButton test
Browse files Browse the repository at this point in the history
  • Loading branch information
deuch13 committed May 24, 2024
1 parent fbbae0c commit be4aedd
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// @ts-nocheck

import { afterEach, describe, expect, it } from "vitest";
import { cleanup, render } from "@testing-library/svelte";
import { mdiFolderOutline } from "@mdi/js";
Expand All @@ -15,6 +13,7 @@ describe("AnchorButton", () => {
props: baseProps,
target: document.body,
};
const iconPositions = /** @type {const} */ (["after", "before", undefined]);

afterEach(cleanup);

Expand Down Expand Up @@ -56,7 +55,7 @@ describe("AnchorButton", () => {
});

it("should be able to render a AnchorButton with an icon and text", () => {
["after", "before"].forEach((position) => {
iconPositions.forEach((position) => {
const props = {
...baseProps,
icon: {
Expand All @@ -71,7 +70,7 @@ describe("AnchorButton", () => {
});

it("should be able to render a AnchorButton with an icon only", () => {
["after", "before"].forEach((position) => {
iconPositions.forEach((position) => {
const props = {
...baseProps,
icon: {
Expand All @@ -85,4 +84,4 @@ describe("AnchorButton", () => {
expect(container.firstChild).toMatchSnapshot();
});
});
});
});

0 comments on commit be4aedd

Please sign in to comment.