mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
11 lines
361 B
TypeScript
11 lines
361 B
TypeScript
import { expect, test } from "bun:test";
|
|
|
|
test("Response.redirect clones string from Location header", () => {
|
|
const url = new URL("http://example.com");
|
|
url.hostname = "example1.com";
|
|
const { href } = url;
|
|
expect(href).toBe("http://example1.com/");
|
|
const response = Response.redirect(href);
|
|
expect(response.headers.get("Location")).toBe(href);
|
|
});
|