mirror of
https://github.com/stablyai/orca.git
synced 2026-10-20 08:03:28 +00:00
test(skills): pin the Windows rewrite expectation so -y cannot regress
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.
This commit is contained in:
@@ -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', () => {
|
||||
|
||||
Reference in New Issue
Block a user