Skip to content

Commit

Permalink
clear local storage after each test
Browse files Browse the repository at this point in the history
  • Loading branch information
tomastauer committed Apr 21, 2024
1 parent 4a929e4 commit 987c75d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/todo-list.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import userEvent from '@testing-library/user-event';
import TodoList from '../src/app/page';
import { useItemsStore } from '../src/app/hooks/useItemsStore';

afterEach(() => {
localStorage.clear();
});

it('should append new item at the end of the list by clicking the button', async () => {
render(<TodoList />);

Expand Down

0 comments on commit 987c75d

Please sign in to comment.