Files
simple-mail-cleaner/backend/node_modules/fastify/test/esm/errorCodes.test.mjs
2026-01-22 15:49:12 +01:00

11 lines
405 B
JavaScript

import { errorCodes } from '../../fastify.js'
import t from 'tap'
t.test('errorCodes in ESM', async t => {
// test a custom fastify error using errorCodes with ESM
const customError = errorCodes.FST_ERR_VALIDATION('custom error message')
t.ok(typeof customError !== 'undefined')
t.ok(customError instanceof errorCodes.FST_ERR_VALIDATION)
t.equal(customError.message, 'custom error message')
})