Skip to content

Commit

Permalink
Merge branch 'release/v0.1.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
nicosommi committed Jul 30, 2015
2 parents 3aa3f2a + 3f84a6f commit 940dd66
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions es5/spec/multiError.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var _libMultiErrorJs = require("../lib/multiError.js");
var _ = require("../../");

var _libMultiErrorJs2 = _interopRequireDefault(_libMultiErrorJs);
var _2 = _interopRequireDefault(_);

describe("MultiError(errors)", function () {
var multiError = undefined,
errors = undefined;

beforeEach(function () {
errors = [new Error("You cannot do that"), new Error("You cannot do that, either"), new Error("You again? Stop it")];
multiError = new _libMultiErrorJs2["default"](errors);
multiError = new _2["default"](errors);
});

describe("(with prefix)", function () {
var prefix = undefined;
beforeEach(function () {
prefix = "someprefix";
multiError = new _libMultiErrorJs2["default"](errors, prefix);
multiError = new _2["default"](errors, prefix);
});

describe(".message", function () {
Expand All @@ -41,24 +41,24 @@ describe("MultiError(errors)", function () {
});
describe("(with prefix on array)", function () {
beforeEach(function () {
multiError = new _libMultiErrorJs2["default"](errors, "ErrorPrefix");
multiError = new _2["default"](errors, "ErrorPrefix");
});

it("should set the errors name to be the prefix", function () {
multiError.errors[0].name.should.equal("ErrorPrefix");
});
});
it("should be set to the errors passing an array of Errors by the constructor", function () {
multiError = new _libMultiErrorJs2["default"](errors);
multiError = new _2["default"](errors);
multiError.errors.should.eql(errors);
});
it("should be set to the errors passing an Error on the constructor", function () {
var originalError = new Error("some error");
multiError = new _libMultiErrorJs2["default"](originalError);
multiError = new _2["default"](originalError);
multiError.errors[0].should.eql(originalError);
});
it("should be set to an empty array when nothing is passed by the constructor", function () {
multiError = new _libMultiErrorJs2["default"]();
multiError = new _2["default"]();
multiError.errors.should.eql([]);
});
});
Expand Down
2 changes: 1 addition & 1 deletion es6/spec/multiError.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import MultiError from "../lib/multiError.js";
import MultiError from "../../";

describe("MultiError(errors)", () => {
let multiError, errors;
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
module.exports = require("./es5/lib/blunder.js");
module.exports = require("./es5/lib/multiError.js");
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blunder",
"version": "0.1.4",
"version": "0.1.5",
"description": "ES6 Component for handling errors.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 940dd66

Please sign in to comment.