fastify-cli
Version:
Run a fastify route with one command!
27 lines (22 loc) • 582 B
JavaScript
const { test } = require('tap')
const Fastify = require('fastify')
const Support = require('../../plugins/support')
test('support works standalone', (t) => {
t.plan(2)
const fastify = Fastify()
fastify.register(Support)
fastify.ready((err) => {
t.error(err)
t.equal(fastify.someSupport(), 'hugs')
})
})
// It you prefer async/await, use the following
//
// test('support works standalone', async (t) => {
// const fastify = Fastify()
// fastify.register(Support)
//
// await fastify.ready()
// t.equal(fastify.someSupport(), 'hugs')
// })