This commit is contained in:
Karan 2018-09-28 19:24:56 -04:00
parent e3a1187ef9
commit 0305be95ad
1 changed files with 22 additions and 0 deletions

View File

@ -99,3 +99,25 @@ describe('fs.writeFile, fs.readFile', function() {
});
});
});
describe('fsPromises.Write', function() {
it('should write, read a utf8 file without specifying utf8 in writeFile', function() {
//var fs = util.fs();
//var contents = 'This is a file.';
var fsPromises = util.fs().promises;
return fsPromises.writeFile('/myfile' , { encoding: 'utf8' })
.then(() => {
return fsPromises.readFile('/myfile', 'utf8')
.catch((error) => {
expect(error).not.to.exist;
//expect(data).to.equal(contents);
//done();
});
});
});
});