Files
bun.sh/test/js/node/missing-module.test.js
2024-09-12 16:44:03 -07:00

8 lines
337 B
JavaScript

import { expect, test } from "bun:test";
test("not implemented yet module throws an error", () => {
const missingModule = "node:missing" + "";
expect(() => require(missingModule)).toThrow(/^Cannot find package "node:missing" from "/);
expect(() => import(missingModule)).toThrow(/^Cannot find package "node:missing" from "/);
});