()
| 40 | // ============================================================================= |
| 41 | |
| 42 | async function testBasicWritev() { |
| 43 | const filePath = path.join(tmpDir, 'writer-writev.txt'); |
| 44 | const fh = await open(filePath, 'w'); |
| 45 | const w = fh.writer(); |
| 46 | await w.writev([ |
| 47 | Buffer.from('aaa'), |
| 48 | Buffer.from('bbb'), |
| 49 | Buffer.from('ccc'), |
| 50 | ]); |
| 51 | const totalBytes = await w.end(); |
| 52 | await fh.close(); |
| 53 | |
| 54 | assert.strictEqual(totalBytes, 9); |
| 55 | assert.strictEqual(fs.readFileSync(filePath, 'utf8'), 'aaabbbccc'); |
| 56 | } |
| 57 | |
| 58 | // ============================================================================= |
| 59 | // Mixed write() and writev() |
no test coverage detected