(views: ArrayBufferView[])
| 247 | } |
| 248 | |
| 249 | function concatBuffers(views: ArrayBufferView[]): Uint8Array { |
| 250 | let length = 0 |
| 251 | for (const v of views) length += v.byteLength |
| 252 | |
| 253 | const buf = new Uint8Array(length) |
| 254 | let offset = 0 |
| 255 | for (const v of views) { |
| 256 | const uint8view = new Uint8Array(v.buffer) |
| 257 | buf.set(uint8view, offset) |
| 258 | offset += uint8view.byteLength |
| 259 | } |
| 260 | |
| 261 | return buf |
| 262 | } |
| 263 | |
| 264 | describe('PgPacketStream', () => { |
| 265 | testForMessage(authOkBuffer, expectedAuthenticationOkayMessage) |
no outgoing calls
no test coverage detected