Skip to content

Commit c5ef8fc

Browse files
Fix period in absolute path munging test names (#1843)
I use a `~/code/github.com/account/repo` structure, this meant that the `p.split(".")[0]` (which was intended to remove the `.yml` extension) instead named all recorded tests `../../../../../../../github` ## Checklist - [/] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [/] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [/] I have not broken the cheatsheet --------- Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
1 parent bf24769 commit c5ef8fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/common/src/testUtil/getFixturePaths.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export function getRecordedTestPaths() {
2828
return walkFilesSync(directory)
2929
.filter((p) => p.endsWith(".yml") || p.endsWith(".yaml"))
3030
.map((p) => ({
31-
name: path.relative(relativeDir, p.split(".")[0]),
31+
name: path.relative(relativeDir, p.substring(0, p.lastIndexOf("."))),
3232
path: p,
3333
}));
3434
}

0 commit comments

Comments
 (0)