From d03510e413e6571df362807c2b78c57ef5d39260 Mon Sep 17 00:00:00 2001 From: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Date: Tue, 28 Jul 2026 18:15:05 -0700 Subject: [PATCH] test(skills): pin the Windows rewrite expectation so -y cannot regress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The two Windows-host assertions compared buildSkillCommandForRuntime against buildAgentFeatureSkillInstallCommand — the exact call the code under test makes — so they passed with or without -y. Pin the literals instead. --- .../src/components/settings/CliSkillRuntimeSetup.test.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/renderer/src/components/settings/CliSkillRuntimeSetup.test.tsx b/src/renderer/src/components/settings/CliSkillRuntimeSetup.test.tsx index 2c6cccb43d2..b2d9203c8b4 100644 --- a/src/renderer/src/components/settings/CliSkillRuntimeSetup.test.tsx +++ b/src/renderer/src/components/settings/CliSkillRuntimeSetup.test.tsx @@ -4,7 +4,6 @@ import { tmpdir } from 'node:os' import { join } from 'node:path' import { describe, expect, it } from 'vitest' import { getDefaultSettings } from '../../../../shared/constants' -import { buildAgentFeatureSkillInstallCommand } from '../../../../shared/agent-feature-install-commands' import { buildWslLoginShellCommand } from '../../../../shared/wsl-login-shell-command' import { buildSkillCommandForRuntime, @@ -118,6 +117,8 @@ describe('CliSkillRuntimeSetup runtime helpers', () => { } ) + // Expectations are pinned rather than rebuilt from the builder: this is the only + // coverage that the non-interactive `-y` reaches the Windows rewrite. it('reinstalls Windows-host skill updates through the add path', () => { expect( buildSkillCommandForRuntime( @@ -128,13 +129,13 @@ describe('CliSkillRuntimeSetup runtime helpers', () => { }, 'win32' ) - ).toBe(buildAgentFeatureSkillInstallCommand(['orchestration'])) + ).toBe('npx skills add https://github.com/stablyai/orca --skill orchestration --global -y') }) it('treats missing runtime as a Windows host fallback for skill updates', () => { expect( buildSkillCommandForRuntime('npx skills update orca-cli --global', undefined, 'win32') - ).toBe(buildAgentFeatureSkillInstallCommand(['orca-cli'])) + ).toBe('npx skills add https://github.com/stablyai/orca --skill orca-cli --global -y') }) it('keeps non-Windows host skill updates on the update path', () => {