Skip to content

Commit

Permalink
add failing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
ryandeba committed Mar 8, 2018
1 parent 49100b2 commit 0a11ea8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/specs/dom_components/model/Component.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ module.exports = {
expect(obj.toHTML()).toEqual('<div/>');
});

it('Component toHTML with quotes in attribute', () => {
obj = new Component();
let attr = obj.get('attributes');
attr['data-foo'] = '"bar"';
obj.set('attributes', attr);
expect(obj.toHTML()).toEqual('<div data-foo="&quot;foo&quot;"></div>');
});

it('Component parse empty div', () => {
var el = document.createElement('div');
obj = Component.isComponent(el);
Expand Down

0 comments on commit 0a11ea8

Please sign in to comment.