Skip to content

Instantly share code, notes, and snippets.

@analog-nico
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save analog-nico/cbd45205011e810be855 to your computer and use it in GitHub Desktop.
Save analog-nico/cbd45205011e810be855 to your computer and use it in GitHub Desktop.
Assume.js + appenlight.com
// 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