Skip to content

Commit

Permalink
Merge branch 'main' into feature/async-support
Browse files Browse the repository at this point in the history
(merge toBe fix)
  • Loading branch information
luttje committed Dec 8, 2024
2 parents e4c588d + 98f7720 commit 6128b18
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libs/jestronaut/expect/matchers/toBe.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
local function toBe(expect, expected)
local actual = expect.actual

-- Special case: both actual and expected are nil
if actual == nil and expected == nil then
return true
end

if not expect:checkEquals(actual, expected) then
error("Expected " .. tostring(actual) .. (expect.inverse and " not " or "") .. " to be " .. tostring(expected))
end
Expand Down

0 comments on commit 6128b18

Please sign in to comment.