mirror of
https://github.com/Kaelio/ktx.git
synced 2026-06-07 07:55:13 +02:00
15 lines
433 B
JavaScript
15 lines
433 B
JavaScript
|
|
import assert from "node:assert/strict";
|
||
|
|
import test from "node:test";
|
||
|
|
|
||
|
|
const docsSiteUrl = process.env.DOCS_SITE_URL ?? "http://localhost:3000";
|
||
|
|
|
||
|
|
test("/docs redirects to the docs introduction", async () => {
|
||
|
|
const response = await fetch(`${docsSiteUrl}/docs`, { redirect: "manual" });
|
||
|
|
|
||
|
|
assert.equal(response.status, 307);
|
||
|
|
assert.equal(
|
||
|
|
response.headers.get("location"),
|
||
|
|
"/docs/getting-started/introduction",
|
||
|
|
);
|
||
|
|
});
|