API/api.medcify.app/node_modules/continuation-local-storage/test/proper-exit.tap.js

18 lines
380 B
JavaScript
Raw Permalink Normal View History

2022-09-26 06:11:44 +00:00
'use strict';
// I love when a tap.plan() comes together
console.log('1..1');
process.on('uncaughtException', function (err) {
if (err.message === 'oops') {
console.log("ok got expected message: %s", err.message);
}
else {
throw err;
}
});
var cls = require('../context.js');
var ns = cls.createNamespace('x');
ns.run(function () { throw new Error('oops'); });