Add a docker build step.
All checks were successful
Check / Backend (pull_request) Successful in 6m3s
Check / Frontend (pull_request) Successful in 1m55s

This commit is contained in:
Drew 2025-09-27 20:28:17 -07:00
parent ff6837a751
commit 81c160a50e
10 changed files with 245 additions and 24 deletions

View file

@ -52,9 +52,12 @@ describe('API Client', () => {
const result = await apiClient.listTasks()
expect(mockFetch).toHaveBeenCalledWith('/api/tasks', {
headers: { 'Content-Type': 'application/json' },
})
expect(mockFetch).toHaveBeenCalledWith(
'http://localhost:3000/api/tasks',
{
headers: { 'Content-Type': 'application/json' },
}
)
expect(result).toEqual(mockTasks)
})
@ -94,9 +97,12 @@ describe('API Client', () => {
const result = await apiClient.getTask(mockTask.id)
expect(mockFetch).toHaveBeenCalledWith(`/api/tasks/${mockTask.id}`, {
headers: { 'Content-Type': 'application/json' },
})
expect(mockFetch).toHaveBeenCalledWith(
`http://localhost:3000/api/tasks/${mockTask.id}`,
{
headers: { 'Content-Type': 'application/json' },
}
)
expect(result).toEqual(mockTask)
})
@ -130,11 +136,14 @@ describe('API Client', () => {
const result = await apiClient.createTask(newTaskData)
expect(mockFetch).toHaveBeenCalledWith('/api/tasks', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(newTaskData),
})
expect(mockFetch).toHaveBeenCalledWith(
'http://localhost:3000/api/tasks',
{
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(newTaskData),
}
)
expect(result).toEqual(mockTask)
})
@ -174,11 +183,14 @@ describe('API Client', () => {
const result = await apiClient.updateTask(mockTask.id, updateData)
expect(mockFetch).toHaveBeenCalledWith(`/api/tasks/${mockTask.id}`, {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(updateData),
})
expect(mockFetch).toHaveBeenCalledWith(
`http://localhost:3000/api/tasks/${mockTask.id}`,
{
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(updateData),
}
)
expect(result).toEqual(updatedTask)
})
@ -211,10 +223,13 @@ describe('API Client', () => {
const result = await apiClient.deleteTask(mockTask.id)
expect(result).toBeNull()
expect(mockFetch).toHaveBeenCalledWith(`/api/tasks/${mockTask.id}`, {
method: 'DELETE',
headers: { 'Content-Type': 'application/json' },
})
expect(mockFetch).toHaveBeenCalledWith(
`http://localhost:3000/api/tasks/${mockTask.id}`,
{
method: 'DELETE',
headers: { 'Content-Type': 'application/json' },
}
)
})
it('should handle delete errors', async () => {