mirror of
https://github.com/siddharthvaddem/openscreen.git
synced 2026-11-03 14:40:47 +08:00
test: import jest-dom matchers in SourceSelector test
SourceSelector.test.tsx uses toBeInTheDocument but never imported @testing-library/jest-dom, and vitest.config.ts has no setupFiles to register the matchers globally. It only passed when test ordering happened to leak the matcher from another file, making CI intermittently red on main (e.g. the #652 merge). Importing jest-dom directly makes the test self-sufficient and deterministic.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import "@testing-library/jest-dom";
|
||||
import { fireEvent, render, screen, waitFor } from "@testing-library/react";
|
||||
import { beforeEach, describe, expect, it, vi } from "vitest";
|
||||
import { SourceSelector } from "./SourceSelector";
|
||||
|
||||
Reference in New Issue
Block a user