Skip to content

Commit bee55ab

Browse files
committed
[ fix ] Remove hardcoded filepaths from testings
1 parent 04b372c commit bee55ab

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

lib/js/test/tests/Test__Connection.bs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/js/test/tests/Test__ShowGoals.bs.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/tests/Test__Connection.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ describe("Connection", () => {
105105
)
106106
})
107107

108-
describe("`probeFilepath`", () => {
108+
describe_only("`probeFilepath`", () => {
109109
let agdaMockPath = ref("")
110110
let alsMockPath = ref("")
111111

test/tests/Test__ShowGoals.res

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,14 @@ let run = normalization => {
1515
)
1616

1717
let filteredResponses = responses->Array.filter(filteredResponse)
18-
Assert.deepStrictEqual(filteredResponses, [DisplayInfo(AllGoalsWarnings("*All Goals, Errors*", "?0 : ℕ\n?1 : ℕ\n?2 : ℕ\n?3 : _11\nSort _10 [ at /Users/banacorn/rescript/agda-mode-vscode/test/tests/assets/Goals.agda:11,19-31 ]\n_11 : _10 [ at /Users/banacorn/rescript/agda-mode-vscode/test/tests/assets/Goals.agda:11,19-31 ]\n_14 : ℕ [ at /Users/banacorn/rescript/agda-mode-vscode/test/tests/assets/Goals.agda:11,19-31 ]\n\n———— Error —————————————————————————————————————————————————\nUnsolved constraints"))])
18+
19+
let filepath = Path.asset(filename)
20+
let expectedAllGoalsWarningsBody = `?0 : ℕ\n?1 : ℕ\n?2 : ℕ\n?3 : _11\nSort _10 [ at ${filepath}:11,19-31 ]\n_11 : _10 [ at ${filepath}:11,19-31 ]\n_14 : ℕ [ at ${filepath}:11,19-31 ]\n\n———— Error —————————————————————————————————————————————————\nUnsolved constraints`
21+
22+
Assert.deepStrictEqual(
23+
filteredResponses,
24+
[DisplayInfo(AllGoalsWarnings("*All Goals, Errors*", expectedAllGoalsWarningsBody))],
25+
)
1926
})
2027

2128
Async.it("should work", async () => {

0 commit comments

Comments
 (0)