From c5c2aa2f97a3910a922923f1fc5bef059d6b0d1a Mon Sep 17 00:00:00 2001 From: Fernando Terra <79578735+fterra-encora@users.noreply.github.com> Date: Thu, 28 Dec 2023 15:08:45 -0300 Subject: [PATCH] Fix/unit test issue main merge (#698) * test: try to fix issue on Main Merge Workflow * test: try to fix issue on Main Merge Workflow --- .../components/forms/DateInputComponent.spec.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/frontend/tests/unittests/components/forms/DateInputComponent.spec.ts b/frontend/tests/unittests/components/forms/DateInputComponent.spec.ts index 86abb17da4..4352e9d3e7 100644 --- a/frontend/tests/unittests/components/forms/DateInputComponent.spec.ts +++ b/frontend/tests/unittests/components/forms/DateInputComponent.spec.ts @@ -1,10 +1,13 @@ -import { describe, it, expect, afterEach } from "vitest"; -import { DOMWrapper, mount, enableAutoUnmount } from "@vue/test-utils"; +import { describe, it, expect, afterAll, vi } from "vitest"; +import { DOMWrapper, mount } from "@vue/test-utils"; import DateInputComponent from "@/components/forms/DateInputComponent/index.vue"; import { isMinimumYearsAgo } from "@/helpers/validators/GlobalValidators"; describe("Date Input Component", () => { - enableAutoUnmount(afterEach); + afterAll(() => { + vi.clearAllTimers(); + }); + const id = "my-date"; const setInputValue = async (