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
14 linesCodeBlameRaw
1import { test } from "node:test";
2import assert from "node:assert/strict";
3
4import { ownDescription } from "./description.ts";
5
6test("a change sets the description, clears it, or leaves it", () => {
7 assert.equal(ownDescription("Old", undefined), "Old");
8 assert.equal(ownDescription(null, undefined), null);
9 assert.equal(ownDescription("Old", " New "), "New");
10 assert.equal(ownDescription("Old", ""), null);
11 assert.equal(ownDescription("Old", " "), null);
12 assert.equal(ownDescription("Old", null), null);
13 assert.equal(ownDescription(null, "x".repeat(300))?.length, 200);
14});