From 89abfcd2fbd56c3246772726a85ed0e548d77d3b Mon Sep 17 00:00:00 2001 From: William Boman Date: Mon, 11 Apr 2022 01:04:06 +0200 Subject: make install context available via coroutine context (#586) --- tests/core/installer_spec.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/core/installer_spec.lua') diff --git a/tests/core/installer_spec.lua b/tests/core/installer_spec.lua index 7bddaee6..75911416 100644 --- a/tests/core/installer_spec.lua +++ b/tests/core/installer_spec.lua @@ -26,7 +26,9 @@ describe("installer", function() stdio_sink = process.empty_sink(), requested_version = Optional.empty(), } - local result = installer.execute(ctx, installer_fn) + local result = installer.execute(ctx, function(...) + installer_fn(...) + end) assert.is_nil(result:err_or_nil()) assert.spy(installer_fn).was_called(1) assert.spy(installer_fn).was_called_with(match.ref(ctx)) @@ -52,7 +54,9 @@ describe("installer", function() stdio_sink = process.empty_sink(), requested_version = Optional.empty(), } - local result = installer.execute(ctx, installer_fn) + local result = installer.execute(ctx, function(...) + installer_fn(...) + end) assert.spy(installer_fn).was_called(1) assert.spy(installer_fn).was_called_with(match.ref(ctx)) assert.is_true(result:is_failure()) -- cgit v1.2.3-70-g09d2