UNPKG

@seasketch/geoprocessing

Version:

Geoprocessing and reporting framework for SeaSketch 2.0

25 lines 793 B
import { test, expect } from "vitest"; import matchers from "@testing-library/jest-dom/matchers"; import React from "react"; import { render, screen } from "@testing-library/react"; import "@testing-library/jest-dom"; import Table from "./Table.js"; import fixtures from "../../testing/fixtures/index.js"; expect.extend(matchers); test("Table renders", () => { const columns = [ { Header: "Name", accessor: "name", }, { Header: "Count", accessor: "count", }, ]; render(React.createElement(Table, { columns: columns, data: fixtures.humanUse })); for (const { name } of fixtures.humanUse) { expect(screen.getByText(name)).toBeInTheDocument(); } }); //# sourceMappingURL=Table.test.js.map