Skip to content

Commit

Permalink
Add test to hello world app
Browse files Browse the repository at this point in the history
  • Loading branch information
stanlemon committed Oct 27, 2024
1 parent 585bf97 commit c297ce0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions apps/hello-world/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "@stanlemon/webdev/jest.config.js";
5 changes: 3 additions & 2 deletions apps/hello-world/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@stanlemon/hello-world",
"version": "0.1.20",
"version": "0.1.21",
"description": "A hello world example using the webdev package.",
"author": "Stan Lemon <[email protected]>",
"license": "MIT",
Expand All @@ -10,7 +10,8 @@
"build": "webpack",
"tsc": "tsc",
"lint": "eslint .",
"lint:fix": "eslint --fix ."
"lint:fix": "eslint --fix .",
"test": "jest"
},
"dependencies": {
"@stanlemon/webdev": "*",
Expand Down
9 changes: 9 additions & 0 deletions apps/hello-world/src/components/Home.test.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import Home from "./Home";
import { render, screen, waitFor } from "@testing-library/react";
import "@testing-library/jest-dom";

test("<Home/>", async () => {
render(<Home />);

await waitFor(() => screen.getByText("Hello World"));
});

0 comments on commit c297ce0

Please sign in to comment.