mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-03 00:15:11 +03:00
parent
441f7e54e8
commit
8bcd000829
@ -166,6 +166,7 @@ var errors = {
|
||||
}
|
||||
};
|
||||
|
||||
util.inherits(GhostError, Error);
|
||||
_.each(errors, function (error) {
|
||||
util.inherits(error, GhostError);
|
||||
});
|
||||
|
@ -4,6 +4,11 @@ var errors = require('../../server/errors'),
|
||||
should.equal(true, true);
|
||||
|
||||
describe('Errors', function () {
|
||||
it('Ensure we inherit from Error', function () {
|
||||
var ghostError = new errors.GhostError();
|
||||
(ghostError instanceof Error).should.eql(true);
|
||||
});
|
||||
|
||||
describe('Inherite from other error', function () {
|
||||
it('default', function () {
|
||||
var someError = new Error(), ghostError;
|
||||
|
Loading…
Reference in New Issue
Block a user