diff --git a/spec/core/matchers/toBeFalsySpec.js b/spec/core/matchers/toBeFalsySpec.js index ec4a98e4..feb1d058 100644 --- a/spec/core/matchers/toBeFalsySpec.js +++ b/spec/core/matchers/toBeFalsySpec.js @@ -15,6 +15,9 @@ describe('toBeFalsy', function() { result = matcher.compare(null); expect(result.pass).toBe(true); + result = matcher.compare(undefined); + expect(result.pass).toBe(true); + result = matcher.compare(void 0); expect(result.pass).toBe(true); }); @@ -34,5 +37,11 @@ describe('toBeFalsy', function() { result = matcher.compare({}); expect(result.pass).toBe(false); + + result = matcher.compare([]); + expect(result.pass).toBe(false); + + result = matcher.compare(function() {}); + expect(result.pass).toBe(false); }); }); diff --git a/spec/core/matchers/toBeTruthySpec.js b/spec/core/matchers/toBeTruthySpec.js index f7bb258b..134210be 100644 --- a/spec/core/matchers/toBeTruthySpec.js +++ b/spec/core/matchers/toBeTruthySpec.js @@ -14,6 +14,12 @@ describe('toBeTruthy', function() { result = matcher.compare({}); expect(result.pass).toBe(true); + + result = matcher.compare([]); + expect(result.pass).toBe(true); + + result = matcher.compare(function() {}); + expect(result.pass).toBe(true); }); it("fails for 'falsy' values", function() { @@ -32,6 +38,9 @@ describe('toBeTruthy', function() { result = matcher.compare(null); expect(result.pass).toBe(false); + result = matcher.compare(undefined); + expect(result.pass).toBe(false); + result = matcher.compare(void 0); expect(result.pass).toBe(false); });