add prettier and eslint
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
describe("jasmineUnderTest.pp (HTML Dependent)", function () {
|
||||
it("should stringify non-element HTML nodes properly", function() {
|
||||
var sampleNode = document.createTextNode("");
|
||||
expect(jasmineUnderTest.pp(sampleNode)).toEqual("HTMLNode");
|
||||
expect(jasmineUnderTest.pp({foo: sampleNode})).toEqual("Object({ foo: HTMLNode })");
|
||||
describe('jasmineUnderTest.pp (HTML Dependent)', function() {
|
||||
it('should stringify non-element HTML nodes properly', function() {
|
||||
var sampleNode = document.createTextNode('');
|
||||
expect(jasmineUnderTest.pp(sampleNode)).toEqual('HTMLNode');
|
||||
expect(jasmineUnderTest.pp({ foo: sampleNode })).toEqual(
|
||||
'Object({ foo: HTMLNode })'
|
||||
);
|
||||
});
|
||||
|
||||
it("should stringify empty HTML elements as their opening tags", function () {
|
||||
it('should stringify empty HTML elements as their opening tags', function() {
|
||||
var simple = document.createElement('div');
|
||||
simple.className = 'foo';
|
||||
expect(jasmineUnderTest.pp(simple)).toEqual('<div class="foo">');
|
||||
});
|
||||
|
||||
it("should stringify non-empty HTML elements as tags with placeholders", function() {
|
||||
it('should stringify non-empty HTML elements as tags with placeholders', function() {
|
||||
var nonEmpty = document.createElement('div');
|
||||
nonEmpty.className = 'foo';
|
||||
nonEmpty.innerHTML = '<p>Irrelevant</p>';
|
||||
@@ -19,14 +21,20 @@ describe("jasmineUnderTest.pp (HTML Dependent)", function () {
|
||||
});
|
||||
|
||||
it("should print Firefox's wrapped native objects correctly", function() {
|
||||
if(jasmine.getEnv().firefoxVersion) {
|
||||
try { new CustomEvent(); } catch(e) { var err = e; };
|
||||
if (jasmine.getEnv().firefoxVersion) {
|
||||
try {
|
||||
new CustomEvent();
|
||||
} catch (e) {
|
||||
var err = e;
|
||||
}
|
||||
// Different versions of FF produce different error messages.
|
||||
expect(jasmineUnderTest.pp(err)).toMatch(/Not enough arguments|CustomEvent requires at least 1 argument, but only 0 were passed/);
|
||||
expect(jasmineUnderTest.pp(err)).toMatch(
|
||||
/Not enough arguments|CustomEvent requires at least 1 argument, but only 0 were passed/
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
it("should stringify HTML element with text and attributes", function() {
|
||||
it('should stringify HTML element with text and attributes', function() {
|
||||
var el = document.createElement('div');
|
||||
el.setAttribute('things', 'foo');
|
||||
el.innerHTML = 'foo';
|
||||
|
||||
Reference in New Issue
Block a user