diff options
Diffstat (limited to 'test/parallel/test-fs-truncate.js')
-rw-r--r-- | test/parallel/test-fs-truncate.js | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/test/parallel/test-fs-truncate.js b/test/parallel/test-fs-truncate.js index 65d0c446f6..ab0148a246 100644 --- a/test/parallel/test-fs-truncate.js +++ b/test/parallel/test-fs-truncate.js @@ -42,20 +42,12 @@ assert.equal(stat.size, 0); fs.closeSync(fd); // async tests -var success = 0; -testTruncate(function(er) { +testTruncate(common.mustCall(function(er) { if (er) throw er; - success++; - testFtruncate(function(er) { + testFtruncate(common.mustCall(function(er) { if (er) throw er; - success++; - }); -}); - -process.on('exit', function() { - assert.equal(success, 2); - console.log('ok'); -}); + })); +})); function testTruncate(cb) { fs.writeFile(filename, data, function(er) { |