()
| 158 | |
| 159 | // Async iterator |
| 160 | async function doAsyncIterTest() { |
| 161 | const entries = []; |
| 162 | for await (const dirent of await fs.promises.opendir(testDir)) { |
| 163 | entries.push(dirent.name); |
| 164 | assertDirent(dirent); |
| 165 | } |
| 166 | |
| 167 | assert.deepStrictEqual(files, entries.sort()); |
| 168 | |
| 169 | // Automatically closed during iterator |
| 170 | } |
| 171 | doAsyncIterTest().then(common.mustCall()); |
| 172 | |
| 173 | // Async iterators should do automatic cleanup |
no test coverage detected
searching dependent graphs…