test(skills): regress on skill-update notice (#429)

Add an integration test that installs skills, mutates the installed SKILL.md, and asserts the out-of-date warning is shown. Guards against the bundled-skill path resolution regressing if files move.
This commit is contained in:
Simon Knott
2026-06-29 13:49:28 +02:00
committed by GitHub
parent 9805da3991
commit 13639df120
+14
View File
@@ -14,6 +14,7 @@
* limitations under the License.
*/
import fs from 'fs';
import path from 'path';
import { spawn } from 'child_process';
import { test, expect } from '@playwright/test';
@@ -70,3 +71,16 @@ test('open data URL', async ({}) => {
exitCode: 0,
}));
});
test('warns when installed skill is out of date', async ({}) => {
expect(await runCli('install', '--skills')).toEqual(expect.objectContaining({
exitCode: 0,
}));
const skillFile = path.join(test.info().outputPath(), '.claude', 'skills', 'playwright-cli', 'SKILL.md');
fs.appendFileSync(skillFile, 'x');
expect(await runCli('--help')).toEqual(expect.objectContaining({
error: expect.stringContaining('does not match the tool version'),
}));
});