Skip to content

Commit

Permalink
tests: fix roblox tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lopi-py committed Aug 17, 2024
1 parent a94b64a commit 66f1082
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lua/luau-lsp/roblox/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function M.prepare(cmd)
table.insert(cmd, "--docs=" .. api_docs_file())
end

function M.start()
M.start = vim.schedule_wrap(function()
if config.get().platform.type ~= "roblox" then
return
end
Expand All @@ -82,6 +82,6 @@ function M.start()
if config.get().plugin.enabled then
require("luau-lsp.roblox.studio").start()
end
end
end)

return M
4 changes: 2 additions & 2 deletions spec/server_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ describe("luau-lsp server", function()
assert
.stub(notify).was
.called_with("[luau-lsp.nvim] Unable to find project file `default.project.json`", vim.log.levels.ERROR)
assert.match("globalTypes.PluginSecurity.d.luau", client.config.cmd[4])
assert.match("api%-docs.json", client.config.cmd[5])
assert.match("globalTypes.PluginSecurity.d.luau", client.config.cmd[3])
assert.match("api%-docs.json", client.config.cmd[4])
end)

it("should respect user settings", function()
Expand Down

0 comments on commit 66f1082

Please sign in to comment.