Last active
November 8, 2015 09:42
-
-
Save watson/c90399233f3dd9b9b6ea to your computer and use it in GitHub Desktop.
Testing error-callsites with error-create
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
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