Run npm run lint

This commit is contained in:
Eric Liu 2025-04-18 10:32:02 -07:00
commit 0dbde8b5d9
2 changed files with 4 additions and 2 deletions

View file

@ -7,6 +7,7 @@
<SelectItem value={0} text="Zero" />
<SelectItem value={1} text="One" />
</Select>
<Select labelText="Undefined text">
<SelectItem value={2} />
<SelectItem value={0} text="Zero" />

View file

@ -244,12 +244,13 @@ describe("Select", () => {
render(SelectFalsy);
expect(screen.getByLabelText("Falsy text")).toHaveValue("-1");
expect(screen.getByRole('option', { name: "" })).toBeInTheDocument();
expect(screen.getByRole("option", { name: "" })).toBeInTheDocument();
});
it("renders value if `text` is undefined", () => {
render(SelectFalsy);
expect(screen.getByLabelText("Undefined text")).toHaveValue("2");
expect(screen.getByRole('option', { name: "2" })).toBeInTheDocument();
expect(screen.getByRole("option", { name: "2" })).toBeInTheDocument();
});
});