resolving issue that was identified via pivotal/jasmine#199 where RegExp objects were not properly compared resulting in non-matching RegExp objects to always return true. a patch to jasmine.Env.equals_ adds an extra step for RexExp objects to be compared.
This commit is contained in:
committed by
Davis W. Frank & Rajan Agaskar
parent
3685d3199c
commit
b95c43ab7c
@@ -75,6 +75,9 @@ describe("jasmine.Matchers", function() {
|
||||
expect((match(parseInt('5', 10)).toEqual(5))).toPass();
|
||||
expect((match(5).toNotEqual(5))).toFail();
|
||||
expect((match(parseInt('5', 10)).toNotEqual(5))).toFail();
|
||||
|
||||
expect((match(/1/i).toEqual(/1/i))).toPass();
|
||||
expect((match(/1/i).toNotEqual(/1/i))).toFail();
|
||||
});
|
||||
|
||||
it("toEqual to build an Expectation Result", function() {
|
||||
|
||||
Reference in New Issue
Block a user