diff options
| author | William Boman <william@redwill.se> | 2022-07-06 19:41:43 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2022-07-07 00:39:59 +0200 |
| commit | 5f634e0c37e723fc0c33e06b4fd5c2180178db40 (patch) | |
| tree | fa4f09363adefa8259e23e4d1ea036db628b1243 /tests/core/managers/dotnet_spec.lua | |
| parent | feat(health): use stderr for java version, also check for JAVA_HOME (#765) (diff) | |
| download | mason-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/managers/dotnet_spec.lua')
| -rw-r--r-- | tests/core/managers/dotnet_spec.lua | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/tests/core/managers/dotnet_spec.lua b/tests/core/managers/dotnet_spec.lua index d900bd17..ff922720 100644 --- a/tests/core/managers/dotnet_spec.lua +++ b/tests/core/managers/dotnet_spec.lua @@ -1,23 +1,12 @@ -local mock = require "luassert.mock" -local Optional = require "nvim-lsp-installer.core.optional" -local installer = require "nvim-lsp-installer.core.installer" -local dotnet = require "nvim-lsp-installer.core.managers.dotnet" +local installer = require "mason.core.installer" +local dotnet = require "mason.core.managers.dotnet" describe("dotnet manager", function() - ---@type InstallContext - local ctx - before_each(function() - ctx = InstallContextGenerator { - spawn = mock.new { - dotnet = mockx.returns {}, - }, - } - end) - it( "should call dotnet tool update", async_test(function() - ctx.requested_version = Optional.of "42.13.37" + local handle = InstallHandleGenerator "dummy" + local ctx = InstallContextGenerator(handle, { requested_version = "42.13.37" }) installer.run_installer(ctx, dotnet.package "main-package") assert.spy(ctx.spawn.dotnet).was_called(1) assert.spy(ctx.spawn.dotnet).was_called_with { @@ -34,7 +23,8 @@ describe("dotnet manager", function() it( "should provide receipt information", async_test(function() - ctx.requested_version = Optional.of "42.13.37" + local handle = InstallHandleGenerator "dummy" + local ctx = InstallContextGenerator(handle, { requested_version = "42.13.37" }) installer.run_installer(ctx, dotnet.package "main-package") assert.same({ type = "dotnet", |
