From d9286c549fbdb0547aa6b1b774241020b7610244 Mon Sep 17 00:00:00 2001 From: Matt McCherry Date: Mon, 2 Dec 2024 09:37:02 +0000 Subject: [PATCH] add integration test for toBeNullish --- spec/core/integration/MatchersSpec.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spec/core/integration/MatchersSpec.js b/spec/core/integration/MatchersSpec.js index f09656cd..912ca968 100755 --- a/spec/core/integration/MatchersSpec.js +++ b/spec/core/integration/MatchersSpec.js @@ -469,6 +469,21 @@ describe('Matchers (Integration)', function() { }); }); + describe('toBeNullish', function() { + verifyPasses(function(env) { + env.expect(undefined).toBeNullish(); + }); + + verifyPasses(function(env) { + env.expect(null).toBeNullish(); + }); + + verifyFails(function(env) { + env.expect(1).toBeNullish(); + }); + + }); + describe('toContain', function() { verifyPasses(function(env) { env.addCustomEqualityTester(function(a, b) {