Sha256: e82d72dca7d84a68713d28e1cf79a8a6f260eef5243369e4c0f4073aa700cbf6
Contents?: true
Size: 892 Bytes
Versions: 7
Compression:
Stored size: 892 Bytes
Contents
var createError = require('../../../lib/util/createError'); var expect = require('expect.js'); describe('createError', function () { beforeEach(function () { this.err = createError('message', 500); }); describe('requiring the createError module', function () { it('should expose a createError method', function () { expect(typeof createError === 'function').to.be.ok; }); }); describe('invoking createError', function () { it('should return a new Error Object', function () { expect(typeof createError() === 'object').to.be.ok; }); it('should return an Error with message', function () { expect(this.err.message).to.eql('message'); }); it('should return an Error with code', function () { expect(this.err.code).to.eql(500); }); }); });
Version data entries
7 entries across 7 versions & 1 rubygems