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
26 linesCodeBlameRaw

Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.

The docs' Copy page menu keeps its own spacing, with an icon per item1import assert from "node:assert/strict";
2import { test } from "node:test";
3
4import { trialClosed } from "./trial.ts";
5
6const base = { usedMicros: 0, limitMicros: 1_000_000, endsAt: null };
7
8test("an open trial says nothing", () => {
9 assert.equal(trialClosed({ ...base, open: true, reason: null }, "acme"), null);
10 assert.equal(trialClosed(null, "acme"), null);
11});
12
13test("a spent trial and a given-out month say so", () => {
14 assert.equal(trialClosed({ ...base, open: false, reason: "used" }, "acme"), "acme has used its trial credit on g1t.");
15 assert.equal(
16 trialClosed({ ...base, open: false, reason: "pool", waitsUntil: "2026-11-01T00:00:00Z" }, "acme"),
17 "This month's free trials are all given out; new ones start on November 1.",
18 );
19});
20
21test("a workspace without a card check is told it needs one", () => {
22 assert.equal(
23 trialClosed({ ...base, open: false, reason: "verify" as never }, "acme"),
24 "acme needs a card check before its trial starts. The card is never charged.",
25 );
26});

This file's history is long; its oldest lines are credited to the oldest commit read.