()
| 16 | tmpdir.refresh(); |
| 17 | |
| 18 | async function validateWriteFile() { |
| 19 | const filePathForHandle = path.resolve(tmpDir, 'tmp-write-file2.txt'); |
| 20 | const fileHandle = await open(filePathForHandle, 'w+'); |
| 21 | try { |
| 22 | const buffer = Buffer.from('Hello world'.repeat(100), 'utf8'); |
| 23 | |
| 24 | await fileHandle.writeFile(buffer); |
| 25 | const readFileData = fs.readFileSync(filePathForHandle); |
| 26 | assert.deepStrictEqual(buffer, readFileData); |
| 27 | } finally { |
| 28 | await fileHandle.close(); |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | // Signal aborted while writing file |
| 33 | async function doWriteAndCancel() { |
no test coverage detected
searching dependent graphs…