fix 473
This commit is contained in:
parent
e3a1187ef9
commit
0305be95ad
|
@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue