This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
Files
api/src/tools/plugins/__test__/socket-io.test.ts
2021-10-24 04:18:18 +02:00

14 lines
406 B
TypeScript

import fastify from 'fastify'
import fastifySocketIo from '../socket-io.js'
describe('tools/plugins/socket-io', () => {
it('should close socket server on fastify close', async () => {
const PORT = 3030
const application = fastify()
await application.register(fastifySocketIo)
await application.listen(PORT)
expect(application.io).not.toBeNull()
await application.close()
})
})