Skip to content

Commit 1995bdb

Browse files
authored
chore: refactors tests (#709)
Signed-off-by: Anthony D. Mays <[email protected]>
1 parent b6f629d commit 1995bdb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/javascript/fullstack_demo/src/components/todo-app/todo-app.spec.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ import { TodoApp } from './todo-app';
66
describe('TodoApp', () => {
77
beforeEach(() => {
88
fetchMock.resetMocks();
9+
});
10+
11+
test('initializes correctly', async () => {
12+
// Arrange
913
fetchMock.mockResponseIf(
1014
new URL('/api/todos', process.env.NEXT_PUBLIC_API_URL).toString(),
1115
JSON.stringify([
1216
{ id: 1, text: 'Todo 1', completed: false },
1317
{ id: 2, text: 'Todo 2', completed: true },
1418
] as Todo[]),
1519
);
16-
});
1720

18-
test('initializes correctly', async () => {
1921
// Act
2022
render(<TodoApp />);
2123

0 commit comments

Comments
 (0)