Skip to content

Instantly share code, notes, and snippets.

@watson
Last active November 8, 2015 09:42
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 watson/c90399233f3dd9b9b6ea to your computer and use it in GitHub Desktop.
Save watson/c90399233f3dd9b9b6ea to your computer and use it in GitHub Desktop.
Testing error-callsites with error-create
var assert = require('assert')
var callsites = require('error-callsites')
var MyCustomError = require('error-create')('MyCustomError')
var err = new MyCustomError('foo')
assert(err instanceof Error)
assert(err instanceof MyCustomError)
assert.doesNotThrow(function () {
callsites(err)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment