@@ -1,20 +1,20 @@
|
||||
describe('PrettyPrinter (HTML Dependent)', function() {
|
||||
it('should stringify non-element HTML nodes properly', function() {
|
||||
const sampleNode = document.createTextNode('');
|
||||
const pp = jasmineUnderTest.makePrettyPrinter();
|
||||
const pp = privateUnderTest.makePrettyPrinter();
|
||||
expect(pp(sampleNode)).toEqual('HTMLNode');
|
||||
expect(pp({ foo: sampleNode })).toEqual('Object({ foo: HTMLNode })');
|
||||
});
|
||||
|
||||
it('should stringify empty HTML elements as their opening tags', function() {
|
||||
const simple = document.createElement('div');
|
||||
const pp = jasmineUnderTest.makePrettyPrinter();
|
||||
const pp = privateUnderTest.makePrettyPrinter();
|
||||
simple.className = 'foo';
|
||||
expect(pp(simple)).toEqual('<div class="foo">');
|
||||
});
|
||||
|
||||
it('should stringify non-empty HTML elements as tags with placeholders', function() {
|
||||
const pp = jasmineUnderTest.makePrettyPrinter();
|
||||
const pp = privateUnderTest.makePrettyPrinter();
|
||||
const nonEmpty = document.createElement('div');
|
||||
nonEmpty.className = 'foo';
|
||||
nonEmpty.innerHTML = '<p>Irrelevant</p>';
|
||||
@@ -23,7 +23,7 @@ describe('PrettyPrinter (HTML Dependent)', function() {
|
||||
|
||||
it("should print Firefox's wrapped native objects correctly", function() {
|
||||
if (specHelpers.firefoxVersion) {
|
||||
const pp = jasmineUnderTest.makePrettyPrinter();
|
||||
const pp = privateUnderTest.makePrettyPrinter();
|
||||
let err;
|
||||
try {
|
||||
new CustomEvent();
|
||||
@@ -38,7 +38,7 @@ describe('PrettyPrinter (HTML Dependent)', function() {
|
||||
});
|
||||
|
||||
it('should stringify HTML element with text and attributes', function() {
|
||||
const pp = jasmineUnderTest.makePrettyPrinter();
|
||||
const pp = privateUnderTest.makePrettyPrinter();
|
||||
const el = document.createElement('div');
|
||||
el.setAttribute('things', 'foo');
|
||||
el.innerHTML = 'foo';
|
||||
|
||||
Reference in New Issue
Block a user