aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js/node-crypto.test.js
blob: edd6f6e3da36425f9fd4a015784f37b2e9101450 (plain) (blame)
1
2
3
4
5
6
7
8
import { it, expect } from "bun:test";

const nodeCrypto = require("node:crypto");

it("crypto.randomBytes should return a Buffer", () => {
  expect(nodeCrypto.randomBytes(1) instanceof Buffer).toBe(true);
  expect(Buffer.isBuffer(nodeCrypto.randomBytes(1))).toBe(true);
});