diff --git a/lib/javascript/fullstack_demo/src/components/todo-app/todo-app.spec.tsx b/lib/javascript/fullstack_demo/src/components/todo-app/todo-app.spec.tsx index f01853931..e5941811f 100644 --- a/lib/javascript/fullstack_demo/src/components/todo-app/todo-app.spec.tsx +++ b/lib/javascript/fullstack_demo/src/components/todo-app/todo-app.spec.tsx @@ -6,6 +6,10 @@ import { TodoApp } from './todo-app'; describe('TodoApp', () => { beforeEach(() => { fetchMock.resetMocks(); + }); + + test('initializes correctly', async () => { + // Arrange fetchMock.mockResponseIf( new URL('/api/todos', process.env.NEXT_PUBLIC_API_URL).toString(), JSON.stringify([ @@ -13,9 +17,7 @@ describe('TodoApp', () => { { id: 2, text: 'Todo 2', completed: true }, ] as Todo[]), ); - }); - test('initializes correctly', async () => { // Act render();