fatsify核心功能示例测试!!!
This commit is contained in:
13
node_modules/fastify/test/esm/esm.test.mjs
generated
vendored
Normal file
13
node_modules/fastify/test/esm/esm.test.mjs
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
import { test } from 'node:test'
|
||||
import Fastify from '../../fastify.js'
|
||||
|
||||
test('esm support', async t => {
|
||||
const fastify = Fastify()
|
||||
|
||||
fastify.register(import('./plugin.mjs'), { foo: 'bar' })
|
||||
fastify.register(import('./other.mjs'))
|
||||
|
||||
await fastify.ready()
|
||||
|
||||
t.assert.strictEqual(fastify.foo, 'bar')
|
||||
})
|
||||
Reference in New Issue
Block a user