From 30fb4a015db2226aabaed457ec8930c9f9b8fd78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Sun, 6 Sep 2020 22:27:07 +0200 Subject: test: add common.mustSucceed PR-URL: https://github.com/nodejs/node/pull/35086 Reviewed-By: Ruy Adorno Reviewed-By: Rich Trott --- test/parallel/test-fs-fsync.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'test/parallel/test-fs-fsync.js') diff --git a/test/parallel/test-fs-fsync.js b/test/parallel/test-fs-fsync.js index 70027e33ed..c60fe0af72 100644 --- a/test/parallel/test-fs-fsync.js +++ b/test/parallel/test-fs-fsync.js @@ -35,17 +35,13 @@ const fileTemp = path.join(tmpdir.path, 'a.js'); tmpdir.refresh(); fs.copyFileSync(fileFixture, fileTemp); -fs.open(fileTemp, 'a', 0o777, common.mustCall(function(err, fd) { - assert.ifError(err); - +fs.open(fileTemp, 'a', 0o777, common.mustSucceed((fd) => { fs.fdatasyncSync(fd); fs.fsyncSync(fd); - fs.fdatasync(fd, common.mustCall(function(err) { - assert.ifError(err); - fs.fsync(fd, common.mustCall(function(err) { - assert.ifError(err); + fs.fdatasync(fd, common.mustSucceed(() => { + fs.fsync(fd, common.mustSucceed(() => { fs.closeSync(fd); })); })); -- cgit v1.2.1