aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2023-04-22 22:35:14 +0200
committerGitHub <noreply@github.com>2023-04-22 22:35:14 +0200
commit54c9176cb82fe1c227978c6df2e2b29f985cbd02 (patch)
treee329148d6211513feec0e02ef8610883f55a9e0f /tests
parentfeat(registry): add .get_all_package_specs() (#1247) (diff)
downloadmason-54c9176cb82fe1c227978c6df2e2b29f985cbd02.tar
mason-54c9176cb82fe1c227978c6df2e2b29f985cbd02.tar.gz
mason-54c9176cb82fe1c227978c6df2e2b29f985cbd02.tar.bz2
mason-54c9176cb82fe1c227978c6df2e2b29f985cbd02.tar.lz
mason-54c9176cb82fe1c227978c6df2e2b29f985cbd02.tar.xz
mason-54c9176cb82fe1c227978c6df2e2b29f985cbd02.tar.zst
mason-54c9176cb82fe1c227978c6df2e2b29f985cbd02.zip
refactor(schemas): don't vendor schemas in mason.nvim (#1248)
Instead, schemas are now defined in the package registry and downloaded during installation. See https://github.com/mason-org/mason-registry/pull/1319.
Diffstat (limited to 'tests')
-rw-r--r--tests/mason-core/installer/registry/link_spec.lua18
1 files changed, 14 insertions, 4 deletions
diff --git a/tests/mason-core/installer/registry/link_spec.lua b/tests/mason-core/installer/registry/link_spec.lua
index 97df3e54..662e1323 100644
--- a/tests/mason-core/installer/registry/link_spec.lua
+++ b/tests/mason-core/installer/registry/link_spec.lua
@@ -158,8 +158,6 @@ describe("registry linker", function()
fs.sync.file_exists.on_call_with(path.concat { ctx.cwd:get(), "v1.0.0", "dir", "file2" }).returns(true)
fs.sync.file_exists.on_call_with(path.concat { ctx.cwd:get(), "v1.0.0", "dir", "file3" }).returns(true)
- ctx.fs.file_exists.on_call_with(match.is_ref(ctx.fs), "v1.0.0-exec.sh").returns(true)
-
local result = link.share(
ctx,
{
@@ -184,6 +182,13 @@ describe("registry linker", function()
},
result
)
+
+ assert.same({
+ ["file"] = "v1.0.0-file",
+ ["dir/file1"] = "v1.0.0/dir/file1",
+ ["dir/file2"] = "v1.0.0/dir/file2",
+ ["dir/file3"] = "v1.0.0/dir/file3",
+ }, ctx.links.share)
end)
it("should register opt links", function()
@@ -201,8 +206,6 @@ describe("registry linker", function()
fs.sync.file_exists.on_call_with(path.concat { ctx.cwd:get(), "v1.0.0", "dir", "file2" }).returns(true)
fs.sync.file_exists.on_call_with(path.concat { ctx.cwd:get(), "v1.0.0", "dir", "file3" }).returns(true)
- ctx.fs.file_exists.on_call_with(match.is_ref(ctx.fs), "v1.0.0-exec.sh").returns(true)
-
local result = link.opt(
ctx,
{
@@ -227,5 +230,12 @@ describe("registry linker", function()
},
result
)
+
+ assert.same({
+ ["file"] = "v1.0.0-file",
+ ["dir/file1"] = "v1.0.0/dir/file1",
+ ["dir/file2"] = "v1.0.0/dir/file2",
+ ["dir/file3"] = "v1.0.0/dir/file3",
+ }, ctx.links.opt)
end)
end)