diff options
Diffstat (limited to 'tests/mason-core/managers/npm_spec.lua')
| -rw-r--r-- | tests/mason-core/managers/npm_spec.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/mason-core/managers/npm_spec.lua b/tests/mason-core/managers/npm_spec.lua index 6bfa518d..144adaf3 100644 --- a/tests/mason-core/managers/npm_spec.lua +++ b/tests/mason-core/managers/npm_spec.lua @@ -15,6 +15,7 @@ describe("npm manager", function() async_test(function() local handle = InstallHandleGenerator "dummy" local ctx = InstallContextGenerator(handle, { version = "42.13.37" }) + installer.prepare_installer(ctx) installer.exec_in_context(ctx, npm.packages { "main-package", "supporting-package", "supporting-package2" }) assert.spy(ctx.spawn.npm).was_called_with(match.tbl_containing { "install", @@ -34,6 +35,7 @@ describe("npm manager", function() local ctx = InstallContextGenerator(handle) ctx.fs.file_exists = mockx.returns(false) ctx.fs.dir_exists = mockx.returns(false) + installer.prepare_installer(ctx) installer.exec_in_context(ctx, function() npm.install { "main-package", "supporting-package", "supporting-package2" } end) @@ -51,6 +53,7 @@ describe("npm manager", function() local handle = InstallHandleGenerator "dummy" local ctx = InstallContextGenerator(handle, { version = "42.13.37" }) ctx.fs.append_file = spy.new(mockx.just_runs()) + installer.prepare_installer(ctx) installer.exec_in_context(ctx, npm.packages { "main-package", "supporting-package", "supporting-package2" }) assert.spy(ctx.fs.append_file).was_called(1) assert.spy(ctx.fs.append_file).was_called_with(ctx.fs, ".npmrc", "global-style=true") @@ -62,6 +65,7 @@ describe("npm manager", function() async_test(function() local handle = InstallHandleGenerator "dummy" local ctx = InstallContextGenerator(handle, { version = "42.13.37" }) + installer.prepare_installer(ctx) installer.exec_in_context(ctx, npm.packages { "main-package", "supporting-package", "supporting-package2" }) assert.same({ type = "npm", |
