We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d644470 commit 83ff10bCopy full SHA for 83ff10b
3 files changed
src/App.test.js
src/Todo.js
@@ -42,7 +42,6 @@ const Todo = () => {
42
43
// Save to localStorage
44
saveTodoItemsToLocalStorage('todo', newTodoItems)
45
- console.log(newTodoItems)
46
}, [todoItems]) // Dependencies list for useCallback
47
48
const removeTodoHandler = useCallback(id => {
src/Todo.test.js
@@ -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