Skip to content

Commit

Permalink
Merge pull request #2 from qiushi1511/decrease-coverage-docs
Browse files Browse the repository at this point in the history
Decrease test coverage for apps/docs
  • Loading branch information
qiushi1511 authored Oct 18, 2024
2 parents 3983dc1 + 558e2e0 commit e112619
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
12 changes: 12 additions & 0 deletions apps/docs/app/about.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
function PageContent({ n }: { n: number }) {
return n < 100 ? <h1>Less than 100</h1> : <h1>100 or more</h1>;
}

export default function Page() {
return (
<>
<h1>About</h1>;
<PageContent n={100} />
</>
);
}
13 changes: 13 additions & 0 deletions apps/docs/app/home.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { describe, expect, it } from "@jest/globals";
import { render, screen } from "@testing-library/react";
import Home from "./home";

describe("Page", () => {
it("renders a heading", () => {
render(<Home />);

const heading = screen.getByRole("heading", { level: 1 });

expect(heading).toBeInTheDocument();
});
});
3 changes: 3 additions & 0 deletions apps/docs/app/home.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Page() {
return <h1>Home</h1>;
}

0 comments on commit e112619

Please sign in to comment.