diff options
| author | William Boman <william@redwill.se> | 2022-07-07 01:09:32 +0200 |
|---|---|---|
| committer | William Boman <william@redwill.se> | 2022-07-07 01:09:32 +0200 |
| commit | 4ea062ed9e06b79020377831bc523bbf1fae3e9c (patch) | |
| tree | cd33373fa5de4dfa1cad82fcaad016a75e5eecff /tests | |
| parent | style: run stylua (diff) | |
| download | mason-4ea062ed9e06b79020377831bc523bbf1fae3e9c.tar mason-4ea062ed9e06b79020377831bc523bbf1fae3e9c.tar.gz mason-4ea062ed9e06b79020377831bc523bbf1fae3e9c.tar.bz2 mason-4ea062ed9e06b79020377831bc523bbf1fae3e9c.tar.lz mason-4ea062ed9e06b79020377831bc523bbf1fae3e9c.tar.xz mason-4ea062ed9e06b79020377831bc523bbf1fae3e9c.tar.zst mason-4ea062ed9e06b79020377831bc523bbf1fae3e9c.zip | |
style: more stylua
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/core/installer_spec.lua | 7 | ||||
| -rw-r--r-- | tests/core/managers/go_spec.lua | 38 | ||||
| -rw-r--r-- | tests/core/managers/luarocks_spec.lua | 2 |
3 files changed, 25 insertions, 22 deletions
diff --git a/tests/core/installer_spec.lua b/tests/core/installer_spec.lua index 62e5421e..857721bb 100644 --- a/tests/core/installer_spec.lua +++ b/tests/core/installer_spec.lua @@ -60,10 +60,9 @@ describe("installer", function() local handle = InstallHandleGenerator "dummy" installer.execute(handle, {}) assert.spy(fs.async.write_file).was_called(1) - assert.spy(fs.async.write_file).was_called_with( - ("%s/mason-receipt.json"):format(handle.package:get_install_path()), - match.is_string() - ) + assert + .spy(fs.async.write_file) + .was_called_with(("%s/mason-receipt.json"):format(handle.package:get_install_path()), match.is_string()) end) ) diff --git a/tests/core/managers/go_spec.lua b/tests/core/managers/go_spec.lua index 62c8e8d4..c580277f 100644 --- a/tests/core/managers/go_spec.lua +++ b/tests/core/managers/go_spec.lua @@ -116,28 +116,32 @@ gopls: go1.18 "should return outdated primary package", async_test(function() stub(spawn, "go") - spawn.go.on_call_with({ - "list", - "-json", - "-m", - "golang.org/x/tools/gopls@latest", - cwd = path.package_prefix "dummy", - }).returns(Result.success { - stdout = ([[ + spawn.go + .on_call_with({ + "list", + "-json", + "-m", + "golang.org/x/tools/gopls@latest", + cwd = path.package_prefix "dummy", + }) + .returns(Result.success { + stdout = ([[ { "Path": %q, "Version": "v2.0.0" } ]]):format(path.package_prefix "dummy"), - }) - spawn.go.on_call_with({ - "version", - "-m", - "gopls", - cwd = path.package_prefix "dummy", - }).returns(Result.success { - stdout = go_version_output, - }) + }) + spawn.go + .on_call_with({ + "version", + "-m", + "gopls", + cwd = path.package_prefix "dummy", + }) + .returns(Result.success { + stdout = go_version_output, + }) local result = go.check_outdated_primary_package( mock.new { diff --git a/tests/core/managers/luarocks_spec.lua b/tests/core/managers/luarocks_spec.lua index b7321130..a7091e51 100644 --- a/tests/core/managers/luarocks_spec.lua +++ b/tests/core/managers/luarocks_spec.lua @@ -26,7 +26,7 @@ describe("luarocks manager", function() "should install provided version", async_test(function() local handle = InstallHandleGenerator "dummy" - local ctx = InstallContextGenerator(handle, { requested_version = "1.2.3"}) + local ctx = InstallContextGenerator(handle, { requested_version = "1.2.3" }) installer.run_installer(ctx, luarocks.package "lua-cjson") assert.spy(ctx.spawn.luarocks).was_called(1) assert.spy(ctx.spawn.luarocks).was_called_with { |
