CoolFace
Apppublic

strong-tie/inbound-calls

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
catch-override-exception.test.js27 linesDownload Raw Back to test
1'use strict'2 3const { test } = require('tap')4const boot = require('..')5 6test('catch exceptions in parent.override', (t) => {7  t.plan(2)8 9  const server = {}10 11  const app = boot(server, {12    autostart: false13  })14  app.override = function () {15    throw Error('catch it')16  }17 18  app19    .use(function () {})20    .start()21 22  app.ready(function (err) {23    t.type(err, Error)24    t.match(err, /catch it/)25  })26})27