strong-tie/inbound-calls
0
1'use strict'2 3const { test } = require('node:test')4const fastify = require('..')()5 6const noop = () => {}7const opts = {8 schema: {9 response: {10 '2xx': {11 type: 'object',12 properties: {13 hello: {14 type: 'string'15 }16 }17 }18 }19 }20}21 22test('chainable - get', t => {23 t.plan(1)24 t.assert.strictEqual(fastify.get('/', opts, noop), fastify)25})26 27test('chainable - post', t => {28 t.plan(1)29 t.assert.strictEqual(fastify.post('/', opts, noop), fastify)30})31 32test('chainable - route', t => {33 t.plan(1)34 t.assert.strictEqual(fastify.route({35 method: 'GET',36 url: '/other',37 schema: opts.schema,38 handler: noop39 }), fastify)40})41 