* Assert the Uint8Array is not converted to a Buffer * in the process of calling a Buffer method on it.
(actualUint8Array, expectedBuffer)
| 183 | * in the process of calling a Buffer method on it. |
| 184 | */ |
| 185 | function assertContentEqual(actualUint8Array, expectedBuffer) { |
| 186 | assert.ok(!Buffer.isBuffer(actualUint8Array)); |
| 187 | assert.ok(Buffer.isBuffer(expectedBuffer)); |
| 188 | assert.strictEqual(actualUint8Array.length, expectedBuffer.length); |
| 189 | for (let i = 0; i < actualUint8Array.length; i++) { |
| 190 | assert.strictEqual(actualUint8Array[i], expectedBuffer[i], `Uint8Array and Buffer differ at ${i}`); |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | // Buffer Methods: |
| 195 |
no test coverage detected