Fixes from #504 to pass lint, travis
This commit is contained in:
parent
4a5d8c1222
commit
158f6241b6
|
@ -4,11 +4,15 @@ var expect = require('chai').expect;
|
||||||
describe('fs.write', function() {
|
describe('fs.write', function() {
|
||||||
beforeEach(util.setup);
|
beforeEach(util.setup);
|
||||||
afterEach(util.cleanup);
|
afterEach(util.cleanup);
|
||||||
|
|
||||||
// if the file is undefined, it will create problems
|
it('should be a function', function() {
|
||||||
//
|
var fs = util.fs();
|
||||||
it('should be a error',function(done){
|
expect(fs.write).to.be.a('function');
|
||||||
var fs=util.fs();
|
});
|
||||||
|
|
||||||
|
it('should error if file path is undefined',function(done) {
|
||||||
|
var fs = util.fs();
|
||||||
|
|
||||||
fs.writeFile(undefined, 'data', function(error) {
|
fs.writeFile(undefined, 'data', function(error) {
|
||||||
expect(error).to.exist;
|
expect(error).to.exist;
|
||||||
expect(error.code).to.equal('EINVAL');
|
expect(error.code).to.equal('EINVAL');
|
||||||
|
@ -16,12 +20,6 @@ describe('fs.write', function() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
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) {
|
it('should write data to a file', function(done) {
|
||||||
var fs = util.fs();
|
var fs = util.fs();
|
||||||
var buffer = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
|
var buffer = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]);
|
||||||
|
|
Loading…
Reference in New Issue