File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
tests/src/test/java/org/mozilla/javascript/tests/es6 Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -346,6 +346,24 @@ 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 ("undefined/undefined undefined/undefined W-true C-true E-true" , code );
364+ Utils .assertWithAllModes_1_8 ("undefined/undefined undefined/undefined W-true C-true E-true" , code );
365+ }
366+
349367 public void readOnlyWhenAccessedThroughFunction () {
350368 String code =
351369 "let res = '';\n "
You can’t perform that action at this time.
0 commit comments