mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
23 lines
627 B
JavaScript
23 lines
627 B
JavaScript
// Flags: --expose-internals
|
|
import { describe, test } from "bun:test";
|
|
import assert from "node:assert";
|
|
import { URL, parse } from "node:url";
|
|
|
|
describe("internal/url", () => {
|
|
test.skip("isURL", () => {
|
|
const { isURL } = require("internal/url");
|
|
|
|
assert.strictEqual(isURL("https://www.nodejs.org"), true);
|
|
assert.strictEqual(isURL(new URL("https://www.nodejs.org")), true);
|
|
assert.strictEqual(isURL(parse("https://www.nodejs.org")), false);
|
|
assert.strictEqual(
|
|
isURL({
|
|
href: "https://www.nodejs.org",
|
|
protocol: "https:",
|
|
path: "/",
|
|
}),
|
|
false,
|
|
);
|
|
});
|
|
});
|