MCPcopy Index your code
hub / github.com/nodejs/node / assertDirents

Function assertDirents

test/sequential/test-fs-opendir-recursive.js:134–144  ·  view source on GitHub ↗
(dirents)

Source from the content-addressed store, hash-verified

132}
133
134function assertDirents(dirents) {
135 assert.strictEqual(dirents.length, expected.length);
136 dirents.sort((a, b) => (getDirentPath(a) < getDirentPath(b) ? -1 : 1));
137 assert.deepStrictEqual(
138 dirents.map(common.mustCallAtLeast((dirent) => {
139 assert(dirent instanceof fs.Dirent);
140 return getDirentPath(dirent);
141 })),
142 expected
143 );
144}
145
146function processDirSync(dir) {
147 const dirents = [];

Callers 3

processDirSyncFunction · 0.70
testFunction · 0.70

Calls 4

sortMethod · 0.80
getDirentPathFunction · 0.70
mapMethod · 0.65
assertFunction · 0.50

Tested by 1

testFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…