Skip to content

Commit

Permalink
Fixes from #504 to pass lint, travis
Browse files Browse the repository at this point in the history
  • Loading branch information
humphd committed Dec 15, 2018
1 parent 4a5d8c1 commit 158f624
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions tests/spec/fs.write.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,22 @@ var expect = require('chai').expect;
describe('fs.write', function() {
beforeEach(util.setup);
afterEach(util.cleanup);

// if the file is undefined, it will create problems
//
it('should be a error',function(done){
var fs=util.fs();

it('should be a function', function() {
var fs = util.fs();
expect(fs.write).to.be.a('function');
});

it('should error if file path is undefined',function(done) {
var fs = util.fs();

fs.writeFile(undefined, 'data', function(error) {
expect(error).to.exist;
expect(error.code).to.equal('EINVAL');
done();
});
});


it('should be a function', function() {
var fs = util.fs();
expect(fs.write).to.be.a('function');
});

it('should write data to a file', function(done) {
var fs = util.fs();
var buffer = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
Expand Down

0 comments on commit 158f624

Please sign in to comment.