brf/server/tests/process.test.ts
2025-12-18 07:31:37 +01:00

20 lines
465 B
TypeScript

import { test, type TestContext } from 'node:test'
import processPlugin from '../routes/api/process.ts'
import fastify from 'fastify'
test('/api/process', async (t: TestContext) => {
const server = fastify()
server.decorate('auth', (_request, _reply, done) => done())
server.register(processPlugin, { prefix: '/api/process' })
const res = await server.inject({
method: 'GET',
url: '/api/process',
})
t.assert.equal(res.statusCode, 200)
})