Skip to content

Commit d460870

Browse files
committed
add test
1 parent 4a571ee commit d460870

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package org.htmlunit.corejs;
2+
3+
import org.htmlunit.corejs.javascript.testutils.Utils;
4+
import org.junit.jupiter.api.Test;
5+
6+
/**
7+
* Regressions tests found with Dojo.
8+
* @author Ronald Brill
9+
*/
10+
public class DojoRegressionTest {
11+
12+
/**
13+
* @throws Exception if the test fails
14+
*/
15+
@Test
16+
public void test() throws Exception {
17+
final String script =
18+
"var NodeList = function(array) {\n"
19+
+ " this.length = array.length;\n"
20+
+ " return this;\n"
21+
+ "}\n"
22+
23+
+ "var nlp = NodeList.prototype = [];\n"
24+
25+
+ "var test = new NodeList(['abc']);\n"
26+
+ "'' + nlp.length + ' # ' + test.length";
27+
28+
Utils.assertWithAllModes_ES6("0 # 1", script);
29+
}
30+
}

0 commit comments

Comments
 (0)