diff --git a/tests/components/FooterComponent.spec.ts b/tests/components/FooterComponent.spec.ts index affc224..dae4dfc 100644 --- a/tests/components/FooterComponent.spec.ts +++ b/tests/components/FooterComponent.spec.ts @@ -5,7 +5,7 @@ import * as components from "vuetify/components"; import * as directives from "vuetify/directives"; import FooterComponent from "../../src/components/FooterComponent.vue"; -global.ResizeObserver = require('resize-observer-polyfill'); +globalThis.ResizeObserver = require('resize-observer-polyfill'); const vuetify = createVuetify({ components, diff --git a/tests/components/HeardeNavBar.spec.ts b/tests/components/HeardeNavBar.spec.ts index 4b57f0a..444eb17 100644 --- a/tests/components/HeardeNavBar.spec.ts +++ b/tests/components/HeardeNavBar.spec.ts @@ -6,7 +6,7 @@ import * as components from 'vuetify/components' import * as directives from 'vuetify/directives' import HeaderNavBar from "../../src/components/HeaderNavBar.vue" -global.ResizeObserver = require('resize-observer-polyfill'); +globalThis.ResizeObserver = require('resize-observer-polyfill'); // Mock routes for testing const routes = [ @@ -100,17 +100,17 @@ describe("HeaderNavBar", () => { it("has correct button styling classes", () => { const routerLinks = wrapper.findAllComponents({ name: "RouterLink" }); - - routerLinks.forEach((link: any) => { + + for (const link of routerLinks) { expect(link.classes()).toContain("mx-2") expect(link.classes()).toContain("text-decoration-none") - }); + } const buttons = wrapper.findAllComponents({ name: "v-btn" }); - buttons.forEach((button: any) => { + for (const button of buttons) { expect(button.attributes("class")).toContain("v-btn--size-large"); expect(button.attributes("class")).toContain("-primary"); - }); + } }); it("has proper app bar structure", () => { @@ -127,12 +127,12 @@ describe("HeaderNavBar", () => { it("maintains accessibility attributes", () => { const homeButton = wrapper.find("[data-role='homeNavigation']"); expect(homeButton.attributes("data-role")).toBe('homeNavigation'); - + // Check that buttons are actual button elements for screen readers - const buttons = wrapper.findAll("button") - expect(buttons).toHaveLength(2) - buttons.forEach((button: any) => { + const buttons = wrapper.findAll("button"); + expect(buttons).toHaveLength(2); + for (const button of buttons) { expect(button.element.tagName).toBe("BUTTON"); - }) - }) -}) + } + }); +}); diff --git a/tests/plugins/vuetify.spec.ts b/tests/plugins/vuetify.spec.ts index bd526bd..e1ddf86 100644 --- a/tests/plugins/vuetify.spec.ts +++ b/tests/plugins/vuetify.spec.ts @@ -63,7 +63,7 @@ describe("Vuetify Plugin Configuration", () => { const expectedKeys = ["components", "directives", "theme"]; const actualKeys = Object.keys(callArgs); - expect(actualKeys.sort()).toEqual(expectedKeys.sort()); + expect([...actualKeys].sort((a, b) => a.localeCompare(b))).toEqual([...expectedKeys].sort((a, b) => a.localeCompare(b))); }); it("should export the vuetify instance", async () => {