From c73f5a10d57c8acb52cbbe3a52a1b570b73a0c7c Mon Sep 17 00:00:00 2001 From: Simon Knott Date: Mon, 29 Jun 2026 13:26:13 +0200 Subject: [PATCH] test(skills): regress on skill-update notice 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. --- tests/integration.spec.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/integration.spec.ts b/tests/integration.spec.ts index b48732d..9a383dd 100644 --- a/tests/integration.spec.ts +++ b/tests/integration.spec.ts @@ -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'), + })); +});