added #toBeTrue and #toBeFalse matchers
This commit is contained in:
17
spec/core/matchers/toBeFalseSpec.js
Normal file
17
spec/core/matchers/toBeFalseSpec.js
Normal file
@@ -0,0 +1,17 @@
|
||||
describe("toBeFalse", function() {
|
||||
it("passes for false", function() {
|
||||
var matcher = jasmineUnderTest.matchers.toBeFalse(),
|
||||
result;
|
||||
|
||||
result = matcher.compare(false);
|
||||
expect(result.pass).toBe(true);
|
||||
});
|
||||
|
||||
it("fails for non-false", function() {
|
||||
var matcher = jasmineUnderTest.matchers.toBeFalse(),
|
||||
result;
|
||||
|
||||
result = matcher.compare('foo');
|
||||
expect(result.pass).toBe(false);
|
||||
});
|
||||
});
|
||||
17
spec/core/matchers/toBeTrueSpec.js
Normal file
17
spec/core/matchers/toBeTrueSpec.js
Normal file
@@ -0,0 +1,17 @@
|
||||
describe("toBeTrue", function() {
|
||||
it("passes for true", function() {
|
||||
var matcher = jasmineUnderTest.matchers.toBeTrue(),
|
||||
result;
|
||||
|
||||
result = matcher.compare(true);
|
||||
expect(result.pass).toBe(true);
|
||||
});
|
||||
|
||||
it("fails for non-true", function() {
|
||||
var matcher = jasmineUnderTest.matchers.toBeTrue(),
|
||||
result;
|
||||
|
||||
result = matcher.compare('foo');
|
||||
expect(result.pass).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user