airbrake
Version:
DEPRECATION: please use @airbrake/node instead (https://www.npmjs.com/package/@airbrake/node). A Node.js notifier for Airbrake, the leading exception reporting service.
16 lines (11 loc) • 455 B
JavaScript
var common = require('./common');
var assert = require('assert');
var sinon = require('sinon');
var Airbrake = require(common.dir.root);
(function testProductionEnviroment() {
var airbrake = Airbrake.createClient(common.projectId, common.key, 'production');
sinon.stub(airbrake, '_sendRequest');
airbrake.notify(new Error('this should be posted to airbrake'));
assert.ok(airbrake._sendRequest.called);
airbrake._sendRequest.restore();
}());