Last active
August 29, 2015 14:08
-
-
Save analog-nico/cbd45205011e810be855 to your computer and use it in GitHub Desktop.
Assume.js + appenlight.com
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Released under CC0 (http://creativecommons.org/publicdomain/zero/1.0/) | |
'use strict'; | |
var assume = require('assumejs'); | |
var airbrake = require('airbrake'); | |
var appEnlightClient = airbrake.createClient('your public api key'); | |
appEnlightClient.protocol = 'https'; | |
appEnlightClient.serviceHost = 'api.appenlight.com'; | |
appEnlightClient.developmentEnvironments = []; // Just that App Enlight is contacted from the dev environment as well. | |
assume.overwriteNotify(function (_super) { | |
return function (err, context) { | |
err.context = context; | |
appEnlightClient.notify(err); | |
}; | |
}); | |
var context = { some: 'context' }; | |
assume(true, context).to.eql(false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment