Stabilize frontend unit test environments

This commit is contained in:
Jeppe Bundgaard
2026-04-24 19:22:24 +02:00
parent 7a489e371f
commit 85a6506bfd
6 changed files with 12 additions and 1 deletions
+2
View File
@@ -1,3 +1,5 @@
// @vitest-environment jsdom
import { beforeEach, describe, expect, it, vi } from "vitest";
const { axiosMock } = vi.hoisted(() => ({
@@ -121,7 +121,8 @@ describe("ActionSettingsWheelButton i18n coverage", () => {
const value = getKeyPathValue(messages, key);
expect(typeof value).toBe("string");
expect(value).not.toMatch(/[?]/);
expect(value).not.toMatch(/[?\uFFFD]/u);
expect(value).not.toContain("\u00ef\u00bf\u00bd");
}
}
});
+2
View File
@@ -1,3 +1,5 @@
// @vitest-environment jsdom
import { beforeEach, describe, expect, it, vi } from "vitest";
vi.mock("axios", () => {
+2
View File
@@ -1,3 +1,5 @@
// @vitest-environment jsdom
import { beforeEach, describe, expect, it, vi } from "vitest";
import axios from "axios";
import { usePaginatedList } from "@/components/pagination/paginatedList.vue";
@@ -1,3 +1,5 @@
// @vitest-environment jsdom
import { beforeEach, describe, expect, it, vi } from "vitest";
const mocks = vi.hoisted(() => ({
@@ -1,3 +1,5 @@
// @vitest-environment jsdom
import { describe, expect, it } from "vitest";
import { popups } from "@/components/displays/department/pos/steps/mobile/objects/PosDepartmentStepMobileFlow.vue";