Skip to content

Commit 419e7db

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

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

lib/js/test/tests/Test__FS.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__FS.res

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module TextEncoder = {
77
@send external encode: (t, string) => Uint8Array.t = "encode"
88
}
99

10-
describe("FS", () => {
10+
describe_only("FS", () => {
1111
This.timeout(10000)
1212

1313
describe("copy", () => {

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)