Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: import. #266

Merged
merged 1 commit into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion news-on-earth/src/test/SearchBox.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import { render, fireEvent, screen } from '@testing-library/react';
import SearchBox from '../views/SearchBox';
import { describe, test, expect, jest, beforeEach } from "@jest/globals";
import "@testing-library/jest-dom";

describe('SearchBox', () => {
const mockOnSearchChange = jest.fn();
Expand All @@ -14,7 +16,7 @@ describe('SearchBox', () => {
test('renders the search box with the correct initial value', () => {
const inputElement = screen.getByPlaceholderText('日本語でキーワードを入力');
expect(inputElement).toBeInTheDocument();
expect(inputElement.value).toBe(searchTerm);
expect((inputElement as HTMLInputElement).value).toBe(searchTerm);
});

test('calls onInputChange when text is input', () => {
Expand Down
2 changes: 2 additions & 0 deletions news-on-earth/src/test/SimpleComponent.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import React from 'react';
import { render, screen } from '@testing-library/react';
import SimpleComponent from '../components/SimpleComponent';
import { describe, test, expect } from "@jest/globals";
import "@testing-library/jest-dom";

describe('SimpleComponent', () => {
test('renders the correct content', () => {
Expand Down