kanbango 3.8.0 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/tests/kanban.js DELETED
@@ -1,104 +0,0 @@
1
- const assert = require('assert');
2
- const fs = require('fs').promises;
3
- const os = require('os');
4
- const path = require('path');
5
-
6
- async function run() {
7
- const tempRoot = await fs.mkdtemp(path.join(os.tmpdir(), 'kanbango-kanban-'));
8
- process.chdir(tempRoot);
9
- const kanban = require(path.join(__dirname, '..', 'kanban.js'));
10
-
11
- assert.ok(kanban.COLS.includes('testing'));
12
- assert.ok(kanban.COLS.includes('review'));
13
- assert.strictEqual(kanban.STATUS_MAP.testing, 'testing');
14
- assert.strictEqual(kanban.STATUS_MAP.review, 'review');
15
-
16
- await kanban.ensureBacklogDir();
17
- for (const col of ['testing', 'review']) {
18
- const st = await fs.stat(path.join(tempRoot, 'backlog', col));
19
- assert.ok(st.isDirectory());
20
- }
21
-
22
- const ev = kanban.normalizeEvidence([{
23
- diff: 'old',
24
- test_command: 't',
25
- stdout: '',
26
- stderr: '',
27
- exit_code: 0,
28
- stage: 'testing',
29
- agent: 'qa-tester',
30
- verdict: 'pass',
31
- summary: 'ok'
32
- }]);
33
- assert.strictEqual(ev[0].stage, 'testing');
34
- assert.strictEqual(ev[0].verdict, 'pass');
35
-
36
- const wf = kanban.normalizeWorkflow({
37
- stage: 'review',
38
- status: 'running',
39
- agent: 'temida',
40
- run_id: 'run-x'
41
- });
42
- assert.strictEqual(wf.stage, 'review');
43
- assert.strictEqual(wf.status, 'running');
44
-
45
- const task = await kanban.doCreate('Kanban unit', 'active', '—', {});
46
- const moved = await kanban.updateTask(task.id, { column: 'testing' });
47
- assert.strictEqual(moved.column, 'testing');
48
-
49
- await assert.rejects(
50
- () => kanban.updateTask(task.id, { column: 'done' }),
51
- (err) => {
52
- assert.strictEqual(err.code, 'INVALID_TRANSITION');
53
- assert.deepStrictEqual(err.details.allowed_columns, ['active', 'review']);
54
- assert.strictEqual(err.details.from, 'testing');
55
- assert.strictEqual(err.details.to, 'done');
56
- assert.ok(err.hint.includes('active, review'));
57
- return true;
58
- }
59
- );
60
- assert.deepStrictEqual(kanban.allowedColumnsFrom('active'), ['planned', 'testing', 'icebox']);
61
- assert.deepStrictEqual(kanban.allowedColumnsFrom('review'), ['active', 'done']);
62
- kanban.validateTransition('active', 'testing', '001');
63
- kanban.validateTransition('testing', 'testing', '001');
64
-
65
- const appended = await kanban.updateTask(task.id, {
66
- appendEvidence: {
67
- diff: '',
68
- test_command: 'fake',
69
- stdout: 'PASS',
70
- stderr: '',
71
- exit_code: 0,
72
- stage: 'testing',
73
- agent: 'qa-tester',
74
- verdict: 'pass',
75
- summary: 'PASS'
76
- },
77
- workflow: {
78
- stage: 'testing',
79
- status: 'pass',
80
- agent: 'qa-tester',
81
- run_id: 'run-1'
82
- }
83
- });
84
- assert.ok(appended.evidence.some((e) => e.verdict === 'pass'));
85
- assert.strictEqual(appended.workflow.status, 'pass');
86
-
87
- assert.strictEqual(
88
- kanban.deriveEpicStatus([{ column: 'testing' }], {}),
89
- 'active'
90
- );
91
- const progress = kanban.getEpicProgress([
92
- { column: 'testing' },
93
- { column: 'review' }
94
- ]);
95
- assert.strictEqual(progress.tasks_testing, 1);
96
- assert.strictEqual(progress.tasks_review, 1);
97
-
98
- console.log('✓ kanban.test.js passed');
99
- }
100
-
101
- run().catch((err) => {
102
- console.error(err);
103
- process.exit(1);
104
- });
package/tests/run.js DELETED
@@ -1,38 +0,0 @@
1
- const { spawnSync } = require('child_process');
2
- const path = require('path');
3
-
4
- function runNode(scriptPath, args, label) {
5
- const fullPath = path.join(process.cwd(), scriptPath);
6
- const result = spawnSync(process.execPath, [fullPath, ...(args || [])], {
7
- stdio: 'inherit',
8
- // Agent shells often export KANBANGO_AUTO_GUI=1; MCP child tests would hang.
9
- env: { ...process.env, KANBANGO_AUTO_GUI: '0' }
10
- });
11
- if (result.status !== 0) {
12
- console.error(`✗ ${label} failed`);
13
- process.exit(result.status || 1);
14
- }
15
- console.log(`✓ ${label}`);
16
- }
17
-
18
- runNode(path.join('bin', 'kanban.js'), ['list', '--json'], 'CLI list');
19
- runNode(path.join('tests', 'update-tasks.test.js'), [], 'Update tasks test');
20
- runNode(path.join('tests', 'read-views.test.js'), [], 'Read views test');
21
- runNode(path.join('tests', 'mcp-server.test.js'), [], 'MCP server test');
22
- runNode(path.join('tests', 'gui-port.test.js'), [], 'GUI port test');
23
- runNode(path.join('tests', 'gui-cockpit.test.js'), [], 'GUI cockpit layout + workflow test');
24
- runNode(path.join('tests', 'fenced-text.test.js'), [], 'Fenced text test');
25
- runNode(path.join('tests', 'kanban-mermaid-vendor.test.js'), [], 'Kanban mermaid vendor route test');
26
- runNode(path.join('tests', 'plan-workflow.test.js'), [], 'Plan workflow test');
27
- runNode(path.join('tests', 'workflow-gates.test.js'), [], 'Workflow gates test');
28
- runNode(path.join('tests', 'board-config.test.js'), [], 'Board config columns/agents test');
29
- runNode(path.join('tests', 'config-wizard.test.js'), [], 'Config wizard TUI test');
30
- runNode(path.join('tests', 'kanban.js'), [], 'Kanban core test');
31
- runNode(path.join('tests', 'index.js'), [], 'Package index export test');
32
- runNode(path.join('tests', 'bin-kanban.test.js'), [], 'CLI bin/kanban test');
33
- runNode(path.join('tests', 'agent-playbook.test.js'), [], 'Agent playbook test');
34
- runNode(path.join('tests', 'agent-context.test.js'), [], 'Agent context / depends_on / files test');
35
- runNode(path.join('tests', 'epics.test.js'), [], 'Epics test');
36
- runNode(path.join('tests', 'kanban-epic-goals-adr.test.js'), [], 'Epic goals + ADR test');
37
- runNode(path.join('tests', 'delete-archive.test.js'), [], 'Delete/archive test');
38
- runNode(path.join('tests', 'race-conditions.test.js'), [], 'Race conditions test');