Skip to content

Commit dfcb8c1

Browse files
Daisuke134Anicca Agent
andauthored
test: normalize cwd fallback expectations (#61)
Co-authored-by: Anicca Agent <anicca@aniccaai.com>
1 parent 040434e commit dfcb8c1

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

test/skills.test.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ test("skillName derives from a git url or path, or takes an override", () => {
1515
});
1616

1717
test("skillName never yields `.` or `..`, which would escape the skills dir", () => {
18-
const here = path.basename(process.cwd());
19-
const parent = path.basename(path.dirname(process.cwd()));
18+
// skillName normalizes every derived name to lowercase, including the
19+
// cwd-based fallback. Keep this portable when a checkout lives below an
20+
// uppercase directory such as ~/Projects.
21+
const here = path.basename(process.cwd()).toLowerCase();
22+
const parent = path.basename(path.dirname(process.cwd())).toLowerCase();
2023
assert.equal(skillName("."), here);
2124
assert.equal(skillName("./"), here);
2225
assert.equal(skillName("a/b/."), "b");

0 commit comments

Comments
 (0)