Skip to content

Commit

Permalink
Infrastructure: Consider uncaught errors when running tests to be a f…
Browse files Browse the repository at this point in the history
…ailure (#6107)

#### Brief overview of PR changes/additions
While making a gha to run busted tests for Mudlet packages inside Mudlet, I realized that if the tests hit legit errors during test runs it doesn't write out the failure file. This resolves that.
#### Motivation for adding to Mudlet
More accurate test results
#### Other info (issues closed, discussion etc)
  • Loading branch information
demonnic committed May 23, 2022
1 parent edde628 commit 7c02de7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/run-tests.xml
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,14 @@ function autoRunTests()
end
)

busted.subscribe(
{'error'},
function(element, parent, message)
logTestError()
return nil, true
end
)

bustedState.setup({testLocation})
bustedState.runTests()
raiseEvent("testsComplete")
Expand Down

0 comments on commit 7c02de7

Please sign in to comment.