()
| 30 | } |
| 31 | |
| 32 | async function validateRead() { |
| 33 | const filePathForHandle = path.resolve(tmpDir, 'tmp-read.txt'); |
| 34 | const buf = Buffer.from('Hello world'.repeat(100), 'utf8'); |
| 35 | |
| 36 | fs.writeFileSync(filePathForHandle, buf); |
| 37 | |
| 38 | const fileHandle = await open(filePathForHandle); |
| 39 | assert.deepStrictEqual( |
| 40 | await buffer(fileHandle.createReadStream()), |
| 41 | buf |
| 42 | ); |
| 43 | } |
| 44 | |
| 45 | Promise.all([ |
| 46 | validateWrite(), |
no test coverage detected