Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t.sh
20 linesCodeBlameRaw
1import assert from "node:assert/strict";
2import { test } from "node:test";
3
4import { robotsTxt } from "./robots.ts";
5
6test("everything may be crawled but a file's blame", () => {
7 const text = robotsTxt("https://g1t.example");
8 assert.match(text, /^User-agent: \*\nAllow: \/\n/);
9 assert.match(text, /^Disallow: \/\*\?blame=$/m);
10 assert.match(text, /^Disallow: \/\*&blame=$/m);
11 assert.match(text, /^Disallow: \/\*\/\*\/blame\/$/m);
12 assert.match(text, /^Disallow: \/\*\/\*\/ref\/$/m);
13 assert.match(text, /^Sitemap: https:\/\/g1t\.example\/sitemap\.xml$/m);
14 assert.doesNotMatch(text, /docs\.g1t\.sh/, "a self-hosted g1t has no docs site");
15 assert.ok(text.endsWith("\n"));
16});
17
18test("g1t.sh names its docs' map too", () => {
19 assert.match(robotsTxt("https://g1t.sh"), /^Sitemap: https:\/\/docs\.g1t\.sh\/sitemap-index\.xml$/m);
20});