fastify-knexjs-mock
Version:
Fastify KnexJS Mock Plugin
18 lines (13 loc) • 399 B
JavaScript
const fastify = require('fastify')()
const tap = require('tap')
const fastifyKnexJSMock = require('./index')
tap.test('fastify.knex and fastify.tracker should exist', test => {
test.plan(3)
fastify.register(fastifyKnexJSMock, { client: 'mysql' })
fastify.ready(err => {
test.error(err)
test.ok(fastify.knex)
test.ok(fastify.tracker)
fastify.close(() => test.end())
})
})