Skip to content

Commit

Permalink
fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgomez committed Sep 17, 2024
1 parent 525ed50 commit 18cead2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ls.nim
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ proc createOrRestartNimsuggest*(ls: LanguageServer, projectFile: string, uri = "
MessageType.Error)
ls.sendStatusChanged()


#TODO instead of waiting here, this whole function should be async.
projectNext = waitFor createNimsuggest(projectFile, nimsuggestPath, version,
timeout, restartCallback, errorCallback, workingDir, configuration.logNimsuggest.get(false),
configuration.exceptionHintsEnabled)
Expand Down
4 changes: 2 additions & 2 deletions tests/textensions.nim
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ suite "Nimlangserver":
client.notify("textDocument/didOpen",
%createDidOpenParams("projects/hw/useRoot.nim"))

let prevSuggestPid = ls.projectFiles[hwAbsFile].ns.waitFor.process.pid
let prevSuggestPid = ls.projectFiles[hwAbsFile].process.pid
let suggestParams = SuggestParams(action: saRestart, projectFile: hwAbsFile)
let suggestRes = client.call("extension/suggest", %suggestParams).waitFor
let suggestPid = ls.projectFiles[hwAbsFile].ns.waitFor.process.pid
let suggestPid = ls.projectFiles[hwAbsFile].process.pid

check prevSuggestPid != suggestPid

2 changes: 1 addition & 1 deletion tests/tsuggestapi.nim
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const inputLineWithEndLine = "outline skEnumField system.bool.true bool basic_ty
suite "Nimsuggest tests":
let
helloWorldFile = getCurrentDir() / "tests/projects/hw/hw.nim"
nimSuggest = createNimsuggest(helloWorldFile).waitFor
nimSuggest = createNimsuggest(helloWorldFile).waitFor.ns.waitFor

test "Parsing qualified path":
doAssert parseQualifiedPath("a.b.c") == @["a", "b", "c"]
Expand Down

0 comments on commit 18cead2

Please sign in to comment.