Skip to content

Commit c71edb6

Browse files
author
Duc Le
committed
Add a test to ensure the rendering
1 parent d644470 commit c71edb6

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/App.test.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/Todo.test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react';
2+
import { render } from '@testing-library/react';
3+
import Todo from './Todo';
4+
5+
test('renders add todo input', () => {
6+
const { getByPlaceholderText } = render(<Todo />);
7+
const addTodoInputElement = getByPlaceholderText(/What needs to be done?/i);
8+
expect(addTodoInputElement).toBeInTheDocument();
9+
});

0 commit comments

Comments
 (0)