strong-tie/inbound-calls
0
1import { errorCodes } from '../../fastify.js'2import { test } from 'node:test'3 4test('errorCodes in ESM', async t => {5 // test a custom fastify error using errorCodes with ESM6 const customError = errorCodes.FST_ERR_VALIDATION('custom error message')7 t.assert.ok(typeof customError !== 'undefined')8 t.assert.ok(customError instanceof errorCodes.FST_ERR_VALIDATION)9 t.assert.strictEqual(customError.message, 'custom error message')10})11 