diff --git a/tests/spec/fs.writeFile-readFile.spec.js b/tests/spec/fs.writeFile-readFile.spec.js index 589b273..56583d1 100644 --- a/tests/spec/fs.writeFile-readFile.spec.js +++ b/tests/spec/fs.writeFile-readFile.spec.js @@ -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(); + }); + }); + }); +}); \ No newline at end of file