fastify
Version:
Fast and low overhead web framework, for Node.js
15 lines (12 loc) • 536 B
text/typescript
import { expect, test } from 'tstyche'
import fastify, { FastifyInstance } from '../../fastify.js'
test("has 'Symbol.dispose' when declared with 'using'", async () => {
await using app = fastify()
expect(app).type.toBeAssignableTo<FastifyInstance>()
expect(app[Symbol.asyncDispose]).type.toBe<() => Promise<undefined>>()
})
test("has 'Symbol.dispose'", async () => {
await using app = fastify()
expect(app).type.toBeAssignableTo<FastifyInstance>()
expect(app[Symbol.asyncDispose]).type.toBe<() => Promise<undefined>>()
})