From 10617d7557e578614f7f04b855f44541730b25ec Mon Sep 17 00:00:00 2001 From: S1M0N38 Date: Sun, 11 Feb 2024 15:18:56 +0100 Subject: [PATCH] test: avoid multiple jobs running --- tests/love2d/love2d_spec.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/love2d/love2d_spec.lua b/tests/love2d/love2d_spec.lua index 0c4883f..9d867c2 100644 --- a/tests/love2d/love2d_spec.lua +++ b/tests/love2d/love2d_spec.lua @@ -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()