Fixing the Todo test

We need to change our initialization of the shallow-rendered component to take in the id, critical, and done properties instead! In src/Todo/Todo.test.js, we'll change the first failing test suite by changing the const component statement to include these additional properties:

  const component = shallow(
<Todo
description={description}
removeTodo={mockRemoveTodo}
critical={false}
done={false}
id={1}
/>
);

Rerun the tests and now we should only be down to a single failing test suite! Unfortunately, this will also be the hardest test suite to fix!

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset