Skip to content

Commit

Permalink
Fix HTMLCollection iterator test to actually test HTMLCollection
Browse files Browse the repository at this point in the history
It was previously testing NodeList.
  • Loading branch information
domenic committed Feb 3, 2017
1 parent 5ed5d96 commit f302e06
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,27 @@
<script>
"use strict";

const paragraphs = document.querySelectorAll("p");
const paragraphs = document.getElementsByTagName("p");

test(() => {
assert_true("length" in paragraphs);
}, "HtmlCollection has length method.");
}, "HTMLCollection has length method.");

test(() => {
assert_false("values" in paragraphs);
}, "HtmlCollection does not have iterable's values method.");
}, "HTMLCollection does not have iterable's values method.");

test(() => {
assert_false("entries" in paragraphs);
}, "HtmlCollection does not have iterable's entries method.");
}, "HTMLCollection does not have iterable's entries method.");

test(() => {
assert_false("forEach" in paragraphs);
}, "HtmlCollection does not have iterable's forEach method.");
}, "HTMLCollection does not have iterable's forEach method.");

test(() => {
assert_true(Symbol.iterator in paragraphs);
}, "HtmlCollection has Symbol.iterator.");
}, "HTMLCollection has Symbol.iterator.");

test(() => {
const ids = "12345";
Expand Down

0 comments on commit f302e06

Please sign in to comment.