Skip to content

Commit 1425a5b

Browse files
committed
one more test
1 parent 56eecc1 commit 1425a5b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/src/test/java/org/mozilla/javascript/tests/es6/ArgumentsTest.java

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,26 @@ public void passedCountDifferentFromDeclaredStrict() {
346346
}
347347

348348
@Test
349+
public void descWhenAccessedThroughFunction() {
350+
String code =
351+
"let res = '';\n"
352+
+ "function test() {\n"
353+
+ " let desc = Object.getOwnPropertyDescriptor(test.arguments, '0');\n"
354+
+ " res += typeof desc.get + '/' + desc.get;\n"
355+
+ " res += ' ' + typeof desc.set + '/' + desc.set;\n"
356+
+ " res += ' W-' + desc.writable;\n"
357+
+ " res += ' C-' + desc.configurable;\n"
358+
+ " res += ' E-' + desc.enumerable;\n"
359+
+ "}\n"
360+
+ "test('hello', 'world');\n"
361+
+ "res";
362+
363+
Utils.assertWithAllModes_ES6(
364+
"undefined/undefined undefined/undefined W-true C-true E-true", code);
365+
Utils.assertWithAllModes_1_8(
366+
"undefined/undefined undefined/undefined W-true C-true E-true", code);
367+
}
368+
349369
public void readOnlyWhenAccessedThroughFunction() {
350370
String code =
351371
"let res = '';\n"

0 commit comments

Comments
 (0)