diff --git a/lib/data/data.spec.coffee b/lib/data/data.spec.coffee index 8cf14f8d..e5ccfc8c 100644 --- a/lib/data/data.spec.coffee +++ b/lib/data/data.spec.coffee @@ -85,10 +85,10 @@ describe 'Data:', -> expect(value).to.equal(FILESYSTEM.nested.contents) done() - it 'should return an error if reading an invalid key', (done) -> + it 'should return undefined if reading an invalid key', (done) -> data.get 'nonexistantkey', encoding: 'utf8', (error, value) -> - expect(error).to.be.an.instanceof(Error) - expect(value).to.not.exist + expect(error).to.not.exist + expect(value).to.be.undefined done() it 'should return an error if not reading a file', (done) -> @@ -131,8 +131,8 @@ describe 'Data:', -> (callback) -> data.get filename, encoding: 'utf8', (error, value) -> - expect(error).to.be.an.instanceof(Error) - expect(value).to.not.exist + expect(error).to.not.exist + expect(value).to.be.undefined return callback() (callback) -> @@ -169,8 +169,8 @@ describe 'Data:', -> (callback) -> data.get key, encoding: 'utf8', (error, value) -> - expect(error).to.be.an.instanceof(Error) - expect(value).to.not.exist + expect(error).to.not.exist + expect(value).to.be.undefined return callback() ], (error) -> diff --git a/lib/server/server.spec.coffee b/lib/server/server.spec.coffee index 2587b998..a1fd42f0 100644 --- a/lib/server/server.spec.coffee +++ b/lib/server/server.spec.coffee @@ -156,9 +156,8 @@ describe 'Server:', -> it 'should not send the Authorization header', (done) -> server.request 'GET', URI.ok, null, (error, response) -> - authorizationHeader = response.request.headers.Authorization - expect(error).to.not.exist + authorizationHeader = response.request.headers.Authorization expect(authorizationHeader).to.not.exist done()