()
| 62 | // ============================================================================= |
| 63 | |
| 64 | async function testBinaryData() { |
| 65 | const filePath = path.join(tmpDir, 'pullsync-binary.bin'); |
| 66 | const input = Buffer.alloc(200000); |
| 67 | for (let i = 0; i < input.length; i++) input[i] = i & 0xff; |
| 68 | fs.writeFileSync(filePath, input); |
| 69 | |
| 70 | const fh = await open(filePath, 'r'); |
| 71 | try { |
| 72 | const data = bytesSync(fh.pullSync()); |
| 73 | assert.deepStrictEqual(Buffer.from(data), input); |
| 74 | } finally { |
| 75 | await fh.close(); |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | // ============================================================================= |
| 80 | // pullSync with sync compression transform round-trip |
no test coverage detected