()
| 135 | // ============================================================================= |
| 136 | |
| 137 | async function testStartOption() { |
| 138 | const filePath = path.join(tmpDir, 'writer-start.txt'); |
| 139 | // Pre-fill with 10 A's |
| 140 | fs.writeFileSync(filePath, 'AAAAAAAAAA'); |
| 141 | |
| 142 | const fh = await open(filePath, 'r+'); |
| 143 | const w = fh.writer({ start: 3 }); |
| 144 | await w.write(Buffer.from('BBB')); |
| 145 | await w.end(); |
| 146 | await fh.close(); |
| 147 | |
| 148 | assert.strictEqual(fs.readFileSync(filePath, 'utf8'), 'AAABBBAAAA'); |
| 149 | } |
| 150 | |
| 151 | // ============================================================================= |
| 152 | // start option - sequential writes advance position |
no test coverage detected