chore: correct broken int test import paths

This commit is contained in:
Jarrod Flesch
2024-02-22 16:19:40 -05:00
parent 05b2692eb5
commit 65081d995e
16 changed files with 51 additions and 29 deletions

View File

@@ -13,7 +13,7 @@ export const endpoints: Config['endpoints'] = [
{
path: `/${applicationEndpoint}`,
method: 'get',
handler: ({ req }) => {
handler: () => {
return Response.json({ message: 'Hello, world!' })
},
},
@@ -21,13 +21,12 @@ export const endpoints: Config['endpoints'] = [
path: `/${applicationEndpoint}/i18n`,
method: 'get',
handler: ({ req }) => {
return Response.json({ message: req.t('general:backToDashboard') })
return Response.json({ message: req.t('general:updatedSuccessfully') })
},
},
{
path: `/${rootEndpoint}`,
method: 'get',
root: true,
handler: () => {
return Response.json({ message: 'Hello, world!' })
},
@@ -35,7 +34,6 @@ export const endpoints: Config['endpoints'] = [
{
path: `/${rootEndpoint}`,
method: 'post',
root: true,
handler: ({ req }) => {
return Response.json(req.body)
},

View File

@@ -88,7 +88,7 @@ describe('Endpoints', () => {
const data = await response.json()
expect(response.status).toBe(200)
expect(data.message).toStrictEqual('Back to Dashboard')
expect(data.message).toStrictEqual('Updated successfully.')
})
})