We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b6c65c1 commit c1b0465Copy full SHA for c1b0465
test/parallel/test-fs-readfile-unlink.js
@@ -20,7 +20,7 @@
20
// USE OR OTHER DEALINGS IN THE SOFTWARE.
21
22
'use strict';
23
-require('../common');
+const common = require('../common');
24
25
// Test that unlink succeeds immediately after readFile completes.
26
@@ -37,12 +37,12 @@ tmpdir.refresh();
37
38
fs.writeFileSync(fileName, buf);
39
40
-fs.readFile(fileName, function(err, data) {
+fs.readFile(fileName, common.mustCall((err, data) => {
41
assert.ifError(err);
42
assert.strictEqual(data.length, buf.length);
43
assert.strictEqual(buf[0], 42);
44
45
// Unlink should not throw. This is part of the test. It used to throw on
46
// Windows due to a bug.
47
fs.unlinkSync(fileName);
48
-});
+}));
0 commit comments