feat: migrate from express to fastify
This commit is contained in:
13
src/tools/plugins/__test__/socket-io.test.ts
Normal file
13
src/tools/plugins/__test__/socket-io.test.ts
Normal file
@ -0,0 +1,13 @@
|
||||
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()
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user