Last active
August 29, 2015 14:19
-
-
Save ajcrites/47d06390bab8bbe6e7cb to your computer and use it in GitHub Desktop.
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
/** | |
* Error Factory does not allow (or do anything about) | |
* duplicate error definitions | |
*/ | |
var assert = require("assert"); | |
var errorFactory = require("error-factory"); | |
var one = errorFactory("One", {value: "one"}); | |
var two = errorFactory("Two", {value: "two"}); | |
var three = errorFactory("Three", {value: "three"}); | |
var four = errorFactory("One", {value: "four"}); | |
var five = errorFactory("Two", {value: "five"}); | |
var six = errorFactory("Three", {value: "six"}); | |
assert.equal(new four().value, "one"); | |
assert.equal(new five().value, "two"); | |
assert.equal(new six().value, "three"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment