diff --git a/ui/src/components/Spinner/__tests__/Spinner.test.ts b/ui/src/components/Spinner/__tests__/Spinner.test.ts new file mode 100644 index 00000000..807960ad --- /dev/null +++ b/ui/src/components/Spinner/__tests__/Spinner.test.ts @@ -0,0 +1,16 @@ +import { shallowMount } from "@vue/test-utils"; +import { Spinner } from "../"; + +describe("Spinner", () => { + const spinner = shallowMount(Spinner, { + propsData: { + ariaLabel: "Label" + } + }); + test("renders correctly", () => { + expect(spinner.element).toMatchSnapshot(); + }); + test("renders correct props", () => { + expect(spinner.attributes("aria-label")).toEqual("Label"); + }); +}); diff --git a/ui/src/components/Spinner/__tests__/__snapshots__/Spinner.test.ts.snap b/ui/src/components/Spinner/__tests__/__snapshots__/Spinner.test.ts.snap new file mode 100644 index 00000000..c605db48 --- /dev/null +++ b/ui/src/components/Spinner/__tests__/__snapshots__/Spinner.test.ts.snap @@ -0,0 +1,11 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Spinner renders correctly 1`] = ` +
+
+
+`;