Skip to content

Commit 1f3e4c6

Browse files
committed
Add a regression test for genElement handling elements with no tagName
1 parent 4f2c4a6 commit 1f3e4c6

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/browser.domUtility.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ describe('treeToArray', function () {
109109
var arr = d.treeToArray(e1);
110110
expect(arr.length).to.eql(5);
111111
});
112+
it('should handle elements without tag names', function () {
113+
var e1 = genElement(null);
114+
var arr = d.treeToArray(e1);
115+
expect(arr).to.eql([]);
116+
});
112117
it('should put the innermost element last', function () {
113118
var e1 = genElement('div', 'id1');
114119
var e2 = genElement('div', 'id2', 'a b');

0 commit comments

Comments
 (0)