chore: add typed ESLint checks #18
Refs WealthLedger/main#18. Keep Biome; add no Prettier dependencies.
This commit is contained in:
@@ -4,6 +4,22 @@ import { assert, describe, expect, it } from "vitest";
|
||||
import { EntryCard } from "./EntryCard";
|
||||
|
||||
describe("EntryCard", () => {
|
||||
it("does not leak a numeric zero from an absent action", () => {
|
||||
render(
|
||||
<MantineProvider>
|
||||
<EntryCard
|
||||
title="Пример"
|
||||
metadata="Описание"
|
||||
initial="У"
|
||||
value="—"
|
||||
valueLabel="Неизвестно"
|
||||
tone="neutral"
|
||||
actions={0}
|
||||
/>
|
||||
</MantineProvider>,
|
||||
);
|
||||
expect(screen.queryByText("0")).not.toBeInTheDocument();
|
||||
});
|
||||
it("keeps a failed image fallback until a new source is supplied", () => {
|
||||
const props = {
|
||||
title: "Пример",
|
||||
|
||||
@@ -58,7 +58,7 @@ const EntryCard: FC<EntryCardProps> = (props) => {
|
||||
>
|
||||
{props.valueLabel}
|
||||
</Text>
|
||||
{props.actions && (
|
||||
{Boolean(props.actions) && (
|
||||
<div className={classes.actions}>{props.actions}</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user