Files
ponytail/tests/copilot-plugin.test.js
T
nanaubusinessandAdmin 85cc1d9935 fix: copilot-plugin test checks all 6 command files (#393)
Previously only checked 4 of 6. ponytail-gain.toml and
ponytail-help.toml are now validated.

Closes #381

Co-authored-by: Admin <admin@Admins-MacBook-Pro.local>
2026-06-30 00:21:09 +02:00

36 lines
1.0 KiB
JavaScript

#!/usr/bin/env node
// Smoke test for the Copilot plugin adapter: keep command wiring minimal and
// ensure the debt command is part of the shared command surface.
const test = require('node:test');
const assert = require('node:assert/strict');
const fs = require('fs');
const path = require('path');
const root = path.join(__dirname, '..');
const REQUIRED_COMMAND_FILES = [
'ponytail.toml',
'ponytail-review.toml',
'ponytail-audit.toml',
'ponytail-debt.toml',
'ponytail-gain.toml',
'ponytail-help.toml',
];
function readJSON(relPath) {
return JSON.parse(fs.readFileSync(path.join(root, relPath), 'utf8'));
}
test('copilot plugin command directory includes ponytail-debt', () => {
const manifest = readJSON('.github/plugin/plugin.json');
assert.equal(manifest.name, 'ponytail');
assert.equal(manifest.commands, 'commands/');
for (const file of REQUIRED_COMMAND_FILES) {
assert.ok(
fs.existsSync(path.join(root, manifest.commands, file)),
`missing command file: ${manifest.commands}${file}`,
);
}
});