CoolFace
Apppublic

strong-tie/inbound-calls

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
errorCodes.test.mjs11 linesDownload Raw Back to esm
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