aotds-docks/src/routes/(editor)/export/print/PrintShip/index.test.ts

24 lines
594 B
TypeScript

import { render } from "@testing-library/svelte";
import PrintShip from "./index.svelte";
describe("cargo", () => {
test("with", () => {
const { getByText } = render(PrintShip, {
props: {
structure: { cargo: { space: 10 } },
},
});
expect(getByText("cargo")).toBeTruthy();
});
test("without", () => {
const { queryByText } = render(PrintShip, {
props: {
structure: { cargo: { space: 0 } },
},
});
expect(queryByText("cargo")).toBeFalsy();
});
});