test: simplify fs promises test

Simplify test, fix comment.

PR-URL: https://github.com/nodejs/node/pull/27242
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
Daniel Nalborczyk 2019-04-15 12:42:32 -04:00 committed by Rich Trott
parent aa00968255
commit e0c4a9c8ed

View File

@ -40,8 +40,11 @@ function nextdir() {
return `test${++dirc}`; return `test${++dirc}`;
} }
// fs.promises should not enumerable. // fs.promises should be enumerable.
assert.strictEqual(Object.keys(fs).includes('promises'), true); assert.strictEqual(
Object.prototype.propertyIsEnumerable.call(fs, 'promises'),
true
);
{ {
access(__filename, 'r') access(__filename, 'r')