From a416125cdf073ddd98dfb8929dfb9fd71be4333a Mon Sep 17 00:00:00 2001 From: elsid Date: Wed, 31 Jul 2024 22:37:17 +0200 Subject: [PATCH] Format Lua code --- .../integration_tests/testing_util/testing_util.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/scripts/data/integration_tests/testing_util/testing_util.lua b/scripts/data/integration_tests/testing_util/testing_util.lua index 4aefc5afe5..2fa1892037 100644 --- a/scripts/data/integration_tests/testing_util/testing_util.lua +++ b/scripts/data/integration_tests/testing_util/testing_util.lua @@ -31,8 +31,12 @@ function M.runLocalTest(obj, name) currentLocalTest = name currentLocalTestError = nil obj:sendEvent('runLocalTest', name) - while currentLocalTest do coroutine.yield() end - if currentLocalTestError then error(currentLocalTestError, 2) end + while currentLocalTest do + coroutine.yield() + end + if currentLocalTestError then + error(currentLocalTestError, 2) + end end function M.expect(cond, delta, msg) @@ -198,7 +202,9 @@ M.eventHandlers = { end localTestRunner = coroutine.create(function() local status, err = pcall(fn) - if status then err = nil end + if status then + err = nil + end core.sendGlobalEvent('localTestFinished', {name=name, errMsg=err}) end) end,