Skip to content

Commit 2473fe4

Browse files
Update sdk/src/__tests__/load-skills.test.ts
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent 8561fa6 commit 2473fe4

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

sdk/src/__tests__/load-skills.test.ts

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,11 @@ describe('loadSkills', () => {
140140
description: 'project claude',
141141
})
142142

143-
const skills = await loadSkills({ cwd: projectDir })
144-
145-
expect(skills['priority-skill']?.description).toBe('project claude')
146-
})
147-
148-
test('skips invalid skill directories and malformed skill definitions', async () => {
149-
const skillsRoot = path.join(projectDir, '.agents', 'skills')
150-
const consoleError = spyOn(console, 'error').mockImplementation(() => {})
151-
const consoleWarn = spyOn(console, 'warn').mockImplementation(() => {})
152-
153-
mkdirSync(path.join(skillsRoot, 'missing-skill-file'), { recursive: true })
143+
writeFileSync(
144+
path.join(malformedDir, 'SKILL.md'),
145+
['---', '{invalid yaml: [unclosed', '---'].join('\n'),
146+
'utf8',
147+
)
154148

155149
const malformedDir = path.join(skillsRoot, 'malformed-frontmatter')
156150
mkdirSync(malformedDir, { recursive: true })

0 commit comments

Comments
 (0)