mirror of
https://github.com/iflytek/skillhub.git
synced 2026-10-10 03:27:54 +00:00
test(cli): fix Windows path assertion and clarify test name
- Fix Windows test failure by using regex that accepts both / and \ path separators in install-command.test.ts - Rename contradictory test case in publish-command.test.ts from "surfaces a non-zero exit" to "is handled without crash" to match actual assertion behavior
This commit is contained in:
parent
9643e4157c
commit
8a7770c5e3
2 changed files with 3 additions and 2 deletions
|
|
@ -628,7 +628,8 @@ describe('install command — multi-agent & auto-detect', () => {
|
|||
expect(parsed.installed[0]?.agent).toBe('codex')
|
||||
// On macOS env.cwd may resolve through /private/var/... symlinks; assert
|
||||
// against the structural part of the path instead of an exact prefix.
|
||||
expect(parsed.installed[0]?.dir).toContain('/.codex/skills/pdf-parser')
|
||||
// Use a regex that accepts both Unix (/) and Windows (\) path separators.
|
||||
expect(parsed.installed[0]?.dir).toMatch(/[/\\]\.codex[/\\]skills[/\\]pdf-parser/)
|
||||
expect(parsed.installed[0]?.dir).not.toContain(env.home) // not user-level
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -460,7 +460,7 @@ describe('publish command — content shape', () => {
|
|||
}
|
||||
})
|
||||
|
||||
test('publish response missing required fields surfaces a non-zero exit', async () => {
|
||||
test('publish response missing required fields is handled without crash', async () => {
|
||||
const env = await createTempHome()
|
||||
const server = Bun.serve({
|
||||
port: 0,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue