Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

fastify testing

'use strict'

const build = require('./app')

const test = async () => {
  const app = build()

  const response = await app.inject({
    method: 'GET',
    url: '/'
  })

  console.log('status code: ', response.statusCode)
  console.log('body: ', response.body)
}
test()
Source by www.fastify.io #
 
PREVIOUS NEXT
Tagged: #fastify #testing
ADD COMMENT
Topic
Name
3+8 =