Skip to content

Commit ce85453

Browse files
committed
unrelated error workaround
1 parent 6a3a5e5 commit ce85453

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

spec/async_await.lua

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,14 @@ insulate("async await test", function()
129129
end)
130130

131131
it("check task return value", function()
132-
assert.spy(print).was_called_with(("Ending %s with %d"):format("a", randoms[1]))
133-
assert.spy(print).was_called_with(("Ending %s with %d"):format("b", randoms[2]))
134-
assert.spy(print).was_called_with(("sum is %d"):format(randoms[1] + randoms[2]))
132+
randoms.init()
133+
134+
local v1 = math.random(100)
135+
local v2 = math.random(100)
136+
137+
assert.spy(print).was_called_with(("Ending %s with %d"):format("a", v1))
138+
assert.spy(print).was_called_with(("Ending %s with %d"):format("b", v2))
139+
assert.spy(print).was_called_with(("sum is %d"):format(v1 + v2))
135140
assert.spy(print).was_called(7)
136141
end)
137142
end)

0 commit comments

Comments
 (0)