aboutsummaryrefslogtreecommitdiffstats
path: root/tests/core/spawn_spec.lua
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2022-07-06 19:41:43 +0200
committerWilliam Boman <william@redwill.se>2022-07-07 00:39:59 +0200
commit5f634e0c37e723fc0c33e06b4fd5c2180178db40 (patch)
treefa4f09363adefa8259e23e4d1ea036db628b1243 /tests/core/spawn_spec.lua
parentfeat(health): use stderr for java version, also check for JAVA_HOME (#765) (diff)
downloadmason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar
mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.gz
mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.bz2
mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.lz
mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.xz
mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.tar.zst
mason-5f634e0c37e723fc0c33e06b4fd5c2180178db40.zip
mason.nvim
Diffstat (limited to 'tests/core/spawn_spec.lua')
-rw-r--r--tests/core/spawn_spec.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/core/spawn_spec.lua b/tests/core/spawn_spec.lua
index ce6e4684..744dfa6d 100644
--- a/tests/core/spawn_spec.lua
+++ b/tests/core/spawn_spec.lua
@@ -1,8 +1,8 @@
local spy = require "luassert.spy"
local stub = require "luassert.stub"
local match = require "luassert.match"
-local spawn = require "nvim-lsp-installer.core.spawn"
-local process = require "nvim-lsp-installer.core.process"
+local spawn = require "mason.core.spawn"
+local process = require "mason.core.process"
describe("async spawn", function()
it(
@@ -112,7 +112,7 @@ describe("async spawn", function()
}
assert.spy(on_spawn).was_called(1)
- assert.spy(on_spawn).was_called_with(match.is_not.is_nil(), match.is_not.is_nil())
+ assert.spy(on_spawn).was_called_with(match.is_not.is_nil(), match.is_table(), match.is_number())
assert.is_true(result:is_success())
assert.equals("im so piped rn", result:get_or_nil().stdout)
end)
@@ -156,7 +156,7 @@ describe("async spawn", function()
local result = spawn.bash {}
assert.is_true(result:is_failure())
assert.equals(
- "spawn: bash failed with exit code 127. This is an error message for bash!",
+ "spawn: bash failed with exit code 127 and signal -. This is an error message for bash!",
tostring(result:err_or_nil())
)
end)
@@ -168,7 +168,7 @@ describe("async spawn", function()
local result = spawn.my_cmd {}
assert.is_true(result:is_failure())
assert.equals(
- "spawn: my_cmd failed with no exit code. my_cmd is not executable",
+ "spawn: my_cmd failed with exit code - and signal -. my_cmd is not executable",
tostring(result:err_or_nil())
)
end)