Skip to content

Commit

Permalink
Fixes DOM testing in CI
Browse files Browse the repository at this point in the history
The Tile components test fail on CI and not on local machine.
The fail seems to be related to the interaction of solid-testing-library
and vitest, adds manual DOM cleanup until I can analyze the issue in depth..
  • Loading branch information
baldoalessandro committed Nov 5, 2023
1 parent 827f6e3 commit c09bac3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/tile.test.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
import { render, screen } from "@solidjs/testing-library";
import { cleanup, render, screen } from "@solidjs/testing-library";

import { Tile } from "./tile";

vi.mock("../game/generator");

describe("<Tile> component", () => {
afterEach(async () => {
await cleanup();
});

it("renders", () => {
const props = {
tile: 0b0_010_001_001,
Expand Down

0 comments on commit c09bac3

Please sign in to comment.