feat(tests): add fresh-testing-library tests (#1990)
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import { assert } from "$std/testing/asserts.ts";
|
||||
import { cleanup, render, setup } from "$fresh-testing-library";
|
||||
import { afterEach, beforeAll, describe, it } from "$std/testing/bdd.ts";
|
||||
import Input from "../../../../www/components/gallery/Input.tsx";
|
||||
|
||||
describe("Input.tsx", () => {
|
||||
beforeAll(setup);
|
||||
afterEach(cleanup);
|
||||
|
||||
it("should be disabled", () => {
|
||||
const screen = render(<Input placeholder="text input" disabled />);
|
||||
const input = screen.getByPlaceholderText("text input");
|
||||
assert((input as HTMLInputElement).disabled);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user