fixed two typos in README

This commit is contained in:
Jared Grippe 2009-11-06 13:50:05 +08:00 committed by Christian Williams
parent 2a5754600a
commit 2881a645a5

View File

@ -124,10 +124,10 @@ Jasmine has several built-in matchers. Here are a few:
A Matcher has a method name, takes an expected value as it's only parameter, has access to the actual value in this, and then makes a call to this.report with true/false with a failure message. Here's the definition of `toEqual()`: A Matcher has a method name, takes an expected value as it's only parameter, has access to the actual value in this, and then makes a call to this.report with true/false with a failure message. Here's the definition of `toEqual()`:
Jasmine.Matchers.prototype.toEqual = function (expected) { jasmine.Matchers.prototype.toEqual = function (expected) {
return this.report((this.actual === expected), return this.report((this.actual === expected),
'Expected ' + expected + ' but got ' + this.actual + '.'); 'Expected ' + expected + ' but got ' + this.actual + '.');
}); };
Feel free to define your own matcher as needed in your code. If you'd like to add Matchers to Jasmine, please write tests. Feel free to define your own matcher as needed in your code. If you'd like to add Matchers to Jasmine, please write tests.