Skip to content

Commit

Permalink
test: avoid multiple jobs running
Browse files Browse the repository at this point in the history
  • Loading branch information
S1M0N38 committed Feb 11, 2024
1 parent 2bc68e1 commit 10617d7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/love2d/love2d_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,18 @@ describe("love2d platform", function()
assert.equal(nil, love2d.job.id)
assert.equal(0, love2d.job.exit_code)
end)
it("does not start twice", function()
love2d.setup(opts)
love2d.run("tests/game")
vim.wait(1000)
local old_job_id = love2d.job.id
love2d.run("tests/game")
vim.wait(1000)
local new_job_id = love2d.job.id
love2d.stop()
vim.wait(500)
assert.equal(new_job_id, old_job_id)
end)
end)

describe("love2d LSP", function()
Expand Down

0 comments on commit 10617d7

Please sign in to comment.