Fix pretty printing of RegExp objects.

This commit is contained in:
Christian Williams
2009-11-12 15:37:52 -05:00
parent 98e86817bf
commit 7be8247b2f
2 changed files with 6 additions and 2 deletions

View File

@@ -32,6 +32,10 @@ describe("jasmine.pp", function () {
}, bar: [1, 2, 3]})).toEqual("{ foo : Function, bar : [ 1, 2, 3 ] }");
});
it("should stringify RegExp objects properly", function() {
expect(jasmine.pp(/x|y|z/)).toEqual("/x|y|z/");
});
it("should indicate circular object references", function() {
var sampleValue = {foo: 'hello'};
sampleValue.nested = sampleValue;