CoolFace
Apppublic

strong-tie/inbound-calls

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
set-error-handler.test.js13 linesDownload Raw Back to test
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