Skip to content

Commit

Permalink
test: テストファイル追加
Browse files Browse the repository at this point in the history
  • Loading branch information
asa129 committed Feb 27, 2025
1 parent 1dc97e6 commit 74a5634
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/tests/componenteSample.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import App from "../App";
import React from "react";
import '@testing-library/jest-dom'
import { render, screen } from "@testing-library/react";

describe("Title Test", () => {
it("タイトルが学習記録一覧であること", () => {
// testId(title)を指定して取得
render(<App />);
const title = screen.getByTestId("title");
expect(title).toHaveTextContent("学習記録一覧");
});
});
5 changes: 5 additions & 0 deletions src/tests/sample.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
describe("Sample Test", () => {
it("should return true", () => {
expect(true).toBe(true);
});
});

0 comments on commit 74a5634

Please sign in to comment.