mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
### What does this PR do? ### How did you verify your code works? --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude <noreply@anthropic.com>
14 lines
593 B
TypeScript
14 lines
593 B
TypeScript
import { expect, test } from "bun:test";
|
|
import buffer, { INSPECT_MAX_BYTES } from "node:buffer";
|
|
|
|
test("buffer.INSPECT_MAX_BYTES is a number and not a custom getter/setter", () => {
|
|
const originalINSPECT_MAX_BYTES = INSPECT_MAX_BYTES;
|
|
expect(INSPECT_MAX_BYTES).toBeNumber();
|
|
expect(buffer.INSPECT_MAX_BYTES).toBeNumber();
|
|
buffer.INSPECT_MAX_BYTES = 1000;
|
|
expect(buffer.INSPECT_MAX_BYTES).toBe(1000);
|
|
expect(INSPECT_MAX_BYTES).toBe(originalINSPECT_MAX_BYTES);
|
|
buffer.INSPECT_MAX_BYTES = originalINSPECT_MAX_BYTES;
|
|
expect(INSPECT_MAX_BYTES).toBe(originalINSPECT_MAX_BYTES);
|
|
});
|