Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit ec00491

Browse files
committed
test: slow test env
1 parent 3a4e0cb commit ec00491

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/c-color-mode/tests/c-color-mode.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { defineComponent, nextTick } from "vue"
2-
import { render, userEvent } from "../../test-utils/src"
2+
import { render, userEvent, waitMs } from "../../test-utils/src"
33
import { useColorMode } from "../src"
44

55
const renderComponent = (props?: any) => {
@@ -27,10 +27,12 @@ it("should toggle colormode", async () => {
2727
expect(getByTestId("colormode").textContent).toBe("light")
2828

2929
await userEvent.click(getByTestId("toggle"))
30+
await waitMs(500)
3031
await nextTick()
3132
expect(getByTestId("colormode").textContent).toBe("dark")
3233

3334
await userEvent.click(getByTestId("toggle"))
35+
await waitMs(500)
3436
await nextTick()
3537
expect(getByTestId("colormode").textContent).toBe("light")
3638

0 commit comments

Comments
 (0)