Skip to content

Commit

Permalink
Add test for if the options parameter is null.
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis committed Jun 27, 2017
1 parent 3b803a6 commit 70ba727
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ describe('filesize()', function () {
})
})

it('should work if the options parameter is null', function (done) {
FILESIZE('index.js', null, function (e, size) {
EXPECT(e).to.be.null
EXPECT(size).to.be.a('string')
done()
})
})

it('should raise ENOENT error if the passed file does not exist', function (done) {
FILESIZE('file-that-does-not-exist', function (e, size) {
EXPECT(e).to.have.own.property('code')
Expand Down

0 comments on commit 70ba727

Please sign in to comment.