MCPcopy
hub / github.com/prisma/prisma / testBufs

Function testBufs

packages/client/src/__tests__/buffer-small.test.ts:2473–2481  ·  view source on GitHub ↗
(string: any, offset?: any, length?: any, encoding?: any)

Source from the content-addressed store, hash-verified

2471 }
2472
2473 function testBufs(string: any, offset?: any, length?: any, encoding?: any) {
2474 bufReset()
2475 // @ts-ignore
2476 // eslint-disable-next-line prefer-spread, prefer-rest-params
2477 buf1.fill.apply(buf1, arguments)
2478 // @ts-ignore Swap bytes on BE archs for ucs2 encoding.
2479 // eslint-disable-next-line prefer-spread, prefer-rest-params
2480 assert.deepStrictEqual(buf1.fill.apply(buf1, arguments), writeToFill.apply(null, arguments))
2481 }
2482
2483 // Make sure these throw.
2484 assert.throws(() => Buffer.allocUnsafe(8).fill('a', -1))

Callers 1

Calls 2

bufResetFunction · 0.85
applyMethod · 0.80

Tested by

no test coverage detected