Update PrettyPrinter to better check for an Object

Includes test case to fix FF as suggested by @ondras
Fixes #409
This commit is contained in:
Sheel Choksi
2013-08-03 11:49:20 -07:00
parent 4c4317b80e
commit 0f42f2709a
3 changed files with 9 additions and 2 deletions

View File

@@ -5,4 +5,11 @@ describe("j$.pp (HTML Dependent)", function () {
expect(j$.pp(sampleNode)).toEqual("HTMLNode");
expect(j$.pp({foo: sampleNode})).toEqual("{ foo : HTMLNode }");
});
it("should print Firefox's wrapped native objects correctly", function() {
if(jasmine.getEnv().firefoxVersion) {
try { new CustomEvent(); } catch(e) { var err = e; };
expect(j$.pp(err)).toMatch(/Exception.*Not enough arguments/);
}
});
});