Skip to content

Commit 200fb01

Browse files
committed
fixup! fs: add throwIfNoEntry option to fs.lstat/fs.promises.lstat
honey, I broke the linter
1 parent 46eebb6 commit 200fb01

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

test/parallel/test-fs-stat.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -230,17 +230,14 @@ fs.lstat(__filename, undefined, common.mustCall());
230230
assert.strictEqual(fs.statSync(path, opts), undefined);
231231
assert.strictEqual(fs.lstatSync(path, opts), undefined);
232232

233-
/* eslint-disable node-core/must-call-assert */
234-
235233
const assertResult = (stats) => {
234+
// eslint-disable-next-line node-core/must-call-assert
236235
assert.strictEqual(stats, undefined);
237236
};
238237

239238
fs.stat(path, opts, common.mustSucceed(assertResult));
240239
fs.lstat(path, opts, common.mustSucceed(assertResult));
241240

242-
fs.promises.stat(path, opts).then(common.mustCall(assertResult));
243-
fs.promises.lstat(path, opts).then(common.mustCall(assertResult));
244-
245-
/* eslint-enable node-core/must-call-assert */
241+
fs.promises.stat(path, opts).then(assertResult).then(common.mustCall());
242+
fs.promises.lstat(path, opts).then(assertResult).then(common.mustCall());
246243
}

0 commit comments

Comments
 (0)