Files
jasmine/spec/javascripts/html/PrettyPrintHtmlSpec.js
Gregg Van Hove and Tim Jarratt 70fb0f0ed5 Update Firefox pretty print test
At some point, firefox changed the exception message.
2013-09-30 15:43:44 -07:00

16 lines
582 B
JavaScript

describe("j$.pp (HTML Dependent)", function () {
it("should stringify HTML nodes properly", function() {
var sampleNode = document.createElement('div');
sampleNode.innerHTML = 'foo<b>bar</b>';
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(/Not enough arguments/);
}
});
});