From 073aca4e00fff05582b7d730dc4392904f21701b Mon Sep 17 00:00:00 2001 From: lopy <70210066+lopi-py@users.noreply.github.com> Date: Sat, 17 Aug 2024 18:52:37 -0500 Subject: [PATCH] test: fix roblox tests --- lua/luau-lsp/roblox/init.lua | 4 ++-- spec/server_spec.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/luau-lsp/roblox/init.lua b/lua/luau-lsp/roblox/init.lua index 2159af0..a425601 100644 --- a/lua/luau-lsp/roblox/init.lua +++ b/lua/luau-lsp/roblox/init.lua @@ -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 @@ -82,6 +82,6 @@ function M.start() if config.get().plugin.enabled then require("luau-lsp.roblox.studio").start() end -end +end) return M diff --git a/spec/server_spec.lua b/spec/server_spec.lua index 07d5b8a..7ce3167 100644 --- a/spec/server_spec.lua +++ b/spec/server_spec.lua @@ -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()