strong-tie/inbound-calls
0
1'use strict'2 3const { test } = require('node:test')4const Fastify = require('..')5const { FST_ERR_ERROR_HANDLER_NOT_FN } = require('../lib/errors')6 7test('setErrorHandler should throw an error if the handler is not a function', t => {8 t.plan(1)9 const fastify = Fastify()10 11 t.assert.throws(() => fastify.setErrorHandler('not a function'), new FST_ERR_ERROR_HANDLER_NOT_FN())12})13 