This commit is contained in:
yubintw
2024-03-25 21:39:05 +08:00
commit 9df48062d4
40 changed files with 15864 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
import { describe, expect, test } from 'vitest'
import { serverOf } from '../src/server'
describe('Server Testing', () => {
const server = serverOf()
test('When send a GET request to /ping, it should return status code 200', async () => {
// act: send a GET request to /ping
const response = await server.inject({
method: 'GET',
url: '/ping'
})
// assert: response should be status code 200
expect(response.statusCode).toBe(200)
})
})