diff options
| author | William Boman <william@redwill.se> | 2023-10-13 21:14:29 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2025-02-19 09:23:19 +0100 |
| commit | ae208dc380808ff1aef39929a0e897e881571d43 (patch) | |
| tree | b9044cec7223062db69998189c76f8163ac9d58b /tests/mason-registry/sources/lua_spec.lua | |
| parent | fix(location): use correct registry path (diff) | |
| download | mason-ae208dc380808ff1aef39929a0e897e881571d43.tar mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.gz mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.bz2 mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.lz mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.xz mason-ae208dc380808ff1aef39929a0e897e881571d43.tar.zst mason-ae208dc380808ff1aef39929a0e897e881571d43.zip | |
refactor: standardize constructors and improve inheritance construction
Diffstat (limited to 'tests/mason-registry/sources/lua_spec.lua')
| -rw-r--r-- | tests/mason-registry/sources/lua_spec.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/mason-registry/sources/lua_spec.lua b/tests/mason-registry/sources/lua_spec.lua index 27a351d7..c720ae10 100644 --- a/tests/mason-registry/sources/lua_spec.lua +++ b/tests/mason-registry/sources/lua_spec.lua @@ -6,7 +6,7 @@ describe("Lua registry source", function() ["my-pkg"] = "pkg-index.my-pkg", } package.loaded["pkg-index.my-pkg"] = {} - local source = LuaRegistrySource.new { + local source = LuaRegistrySource:new { mod = "pkg-index", } assert.is_not_nil(source:get_package "my-pkg") @@ -19,7 +19,7 @@ describe("Lua registry source", function() ["rust-analyzer"] = "pkg-index.rust-analyzer", ["typescript-language-server"] = "pkg-index.typescript-language-server", } - local source = LuaRegistrySource.new { + local source = LuaRegistrySource:new { mod = "pkg-index", } local package_names = source:get_all_package_names() @@ -33,10 +33,10 @@ describe("Lua registry source", function() it("should check if is installed", function() package.loaded["pkg-index"] = {} - local installed_source = LuaRegistrySource.new { + local installed_source = LuaRegistrySource:new { mod = "pkg-index", } - local uninstalled_source = LuaRegistrySource.new { + local uninstalled_source = LuaRegistrySource:new { mod = "non-existent", } @@ -45,6 +45,6 @@ describe("Lua registry source", function() end) it("should stringify instances", function() - assert.equals("LuaRegistrySource(mod=pkg-index)", tostring(LuaRegistrySource.new { mod = "pkg-index" })) + assert.equals("LuaRegistrySource(mod=pkg-index)", tostring(LuaRegistrySource:new { mod = "pkg-index" })) end) end) |
