Skip to content

Commit 6b9bb50

Browse files
committed
fix test (was broken because there was a type in length)
1 parent 8cd924b commit 6b9bb50

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/test/java/org/htmlunit/javascript/host/dom/DOMTokenListTest.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ public void forEach() throws Exception {
211211
* @throws Exception if the test fails
212212
*/
213213
@Test
214-
@Alerts({"4", "a", "b", "c", "d", "4"})
214+
@Alerts({"4", "a", "b", "c", "d",
215+
"7", "a", "b", "c", "d", "new-a", "new-b", "new-c"})
215216
public void forEachAdd() throws Exception {
216217
final String html = DOCTYPE_HTML
217218
+ "<html><head><script>\n"
@@ -222,10 +223,13 @@ public void forEachAdd() throws Exception {
222223

223224
+ " list.forEach((i) => {\n"
224225
+ " log(i);\n"
225-
+ " if (list.length < 7) { list.add('new ' + i); }\n"
226+
+ " if (list.length < 7) { list.add('new-' + i); }\n"
226227
+ " });\n"
227228

228229
+ " log(list.length);\n"
230+
+ " list.forEach((i) => {\n"
231+
+ " log(i);\n"
232+
+ " });\n"
229233
+ "}\n"
230234
+ "</script></head><body onload='test()'>\n"
231235
+ " <div id='d1' class='a b c d'></div>\n"

0 commit comments

Comments
 (0)