API/api.medcify.app/node_modules/continuation-local-storage/test/proper-exit.tap.js
2022-09-26 11:41:44 +05:30

18 lines
380 B
JavaScript

'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'); });