Skip to content

Commit 4da48c3

Browse files
committed
feat(tests): add tests for stop function
1 parent fde9cf3 commit 4da48c3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/love2d/love2d_spec.lua

+9
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,13 @@ describe("love2d mac", function()
3131
vim.wait(500) -- wait for on_exit to be called
3232
assert.equal(0, love2d.job.exit_code)
3333
end)
34+
it("stops", function()
35+
love2d.setup({ path_to_love = "/Applications/love.app/Contents/MacOS/love" })
36+
love2d.run("tests/game")
37+
vim.wait(1000)
38+
love2d.stop()
39+
vim.wait(500)
40+
assert.equal(nil, love2d.job.id)
41+
assert.equal(0, love2d.job.exit_code)
42+
end)
3443
end)

0 commit comments

Comments
 (0)