forked from Archives/Athou_commafeed
reduce tooltip delay for all tests
This commit is contained in:
@@ -12,9 +12,6 @@ vi.mock("@lingui/react", () => ({
|
||||
}))
|
||||
vi.mock("hooks/useActionButton")
|
||||
|
||||
// reduce delay for faster tests
|
||||
vi.mock("app/constants", () => ({ Constants: { tooltip: { delay: 10 } } }))
|
||||
|
||||
const label = "Test Label"
|
||||
const icon = "Test Icon"
|
||||
describe("ActionButton", () => {
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
import "@testing-library/jest-dom"
|
||||
import { Constants } from "app/constants"
|
||||
import { vi } from "vitest"
|
||||
|
||||
// reduce delay for faster tests
|
||||
Constants.tooltip.delay = 10
|
||||
|
||||
// jsdom doesn't mock matchMedia
|
||||
// https://stackoverflow.com/a/53449595/
|
||||
Object.defineProperty(window, "matchMedia", {
|
||||
writable: true,
|
||||
value: vi.fn().mockImplementation(query => ({
|
||||
|
||||
Reference in New Issue
Block a user