Fix issue-447: Added test to append numbers in fs.appendFile function

This commit is contained in:
PopeSpaceous 2018-09-22 16:38:14 -04:00 committed by David Humphrey
parent 1abcb0369b
commit 0395c4beae
1 changed files with 16 additions and 0 deletions

View File

@ -124,6 +124,22 @@ describe('fs.appendFile', function() {
});
});
});
it('should accept numbers and appends them to the file', function(done) {
var fs = util.fs();
var contents = 'This is a file.';
var more = 10000;
fs.appendFile('/myfile', more, 'utf8', function(error) {
if(error) throw error;
fs.readFile('/myfile', 'utf8', function(error, data) {
expect(error).not.to.exist;
expect(data).to.equal(contents + more);
done();
});
});
});
});
describe('fs.promises.appendFile', function() {