working on healthcheck api and auth api (#2)

Reviewed-on: #2
Co-authored-by: Joseph Nelson <joseph.nelson4456@gmail.com>
Co-committed-by: Joseph Nelson <joseph.nelson4456@gmail.com>
This commit was merged in pull request #2.
This commit is contained in:
2026-05-15 22:37:27 -07:00
committed by joseph.nelson4456
parent ce914f91fd
commit 2636816241
16 changed files with 151 additions and 36 deletions
+7
View File
@@ -0,0 +1,7 @@
import express from 'express'
const router = express.Router()
router.get('/', (req, res) => res.json({ status: 'UP' }))
export default router
+19
View File
@@ -0,0 +1,19 @@
// src/routes/healthcheck/test.js
import request from 'supertest'
import app from '../../app'
describe('Health Check Endpoint', () => {
it('should respond with status up', async () => {
const response = await request(app).get('/healthcheck')
expect(response.status).toBe(200)
expect(response.body).toEqual({ status: 'UP' })
})
it('should return a JSON response', async () => {
const response = await request(app).get('/healthcheck')
expect(response.type).toBe('application/json')
})
})