README: drop the stale static version badge (npm badge is live), Agent Skills badge 39 with a test that keeps it in step; CHANGELOG Unreleased for the Windows fixes
This commit is contained in:
parent
46f3e56c09
commit
5317230b08
3 changed files with 26 additions and 2 deletions
19
tests/readme-badges.test.ts
Normal file
19
tests/readme-badges.test.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// README badges never go stale: the version comes from npm (a static version badge once said 0.6.0 at 0.8.23) and the
|
||||
// skill count must match skills/*/SKILL.md.
|
||||
import { describe, expect, test } from 'bun:test';
|
||||
import { existsSync, readdirSync, readFileSync } from 'node:fs';
|
||||
import { join } from 'node:path';
|
||||
|
||||
const root = join(import.meta.dir, '..');
|
||||
const readme = readFileSync(join(root, 'README.md'), 'utf8');
|
||||
|
||||
describe('README badges', () => {
|
||||
test('no hand-written version badge; the npm badge is live', () => {
|
||||
expect(readme).not.toMatch(/img\.shields\.io\/badge\/version-/);
|
||||
expect(readme).toContain('img.shields.io/npm/v/storebound');
|
||||
});
|
||||
test('the Agent Skills badge counts every skill', () => {
|
||||
const n = readdirSync(join(root, 'skills')).filter(d => existsSync(join(root, 'skills', d, 'SKILL.md'))).length;
|
||||
expect(/Agent%20Skills-(\d+)-/.exec(readme)?.[1]).toBe(String(n));
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue