- MCP
- code on this site's /mcp
- CLI
- none: the JSON below is the answer
- JSON
- /christopher/abso-core/files/client/test/join-empty.test.ts?format=json
18 linesonboard 100%Last change onboard in version 224, 1 version changed it
1// Joining a project that has nothing in it yet: the join writes no files, so it says what comes next.
3import assert from "node:assert/strict";
4import { test } from "node:test";
5import { emptyHint } from "../src/join-commands.ts";
7test("an empty project: the next step is to put files here and push", () => {
8 assert.deepEqual(emptyHint(0, 0, 0, false), [
9 'The project is empty. Put its files in this folder, then abso push -m "why" publishes them.',
10 ]);
11});
13test("no hint when there is anything to say instead", () => {
14 assert.deepEqual(emptyHint(3, 0, 0, false), [], "shared has versions, even with no files left");
15 assert.deepEqual(emptyHint(0, 2, 0, false), [], "files were written");
16 assert.deepEqual(emptyHint(0, 0, 1, false), [], "files already in the folder, named by the join's own line");
17 assert.deepEqual(emptyHint(0, 0, 0, true), [], "a reader can't push");
18});