14 lines
406 B
TypeScript
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()
|
|
})
|
|
})
|