Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for Function.prototype.{arguments,caller} #2514

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

claudepache
Copy link
Contributor

@claudepache claudepache commented Feb 27, 2020

Early test coverage for the stage 1 Legacy reflection features for functions in JavaScript proposal (standardisation of Function.prototype.arguments and Function.prototype.caller) in its current state.

Moreover, there are some existing tests that are expected to fail with the proposal, because f.caller = 42 do no longer throw in non-strict mode when f is censored (list copied from claudepache/es-legacy-function-reflection#11):

test262/built-ins/Function/prototype/bind/15.3.4.5-20-3.js
test262/built-ins/Function/prototype/bind/BoundFunction_restricted-properties.js
test262/built-ins/GeneratorFunction/instance-restricted-properties.js
test262/language/statements/function/13.2-22-s.js
test262/language/statements/function/13.2-6-s.js
test262/language/statements/function/13.2-30-s.js
test262/language/statements/function/13.2-10-s.js
test262/language/statements/class/restricted-properties.js
test262/language/statements/class/definition/methods-restricted-properties.js
test262/language/statements/generators/restricted-properties.js
test262/language/expressions/arrow-function/ArrowFunction_restricted-properties.js
test262/language/expressions/class/restricted-properties.js

Those tests will be superseded by the following ones that covers the new semantics:

test262/annexB/built-ins/Function/prototype/arguments-caller/
    deletable-accessor-without-setter
    not-own-properties
    setting-strict-mode

claudepache added a commit to claudepache/es-legacy-function-reflection that referenced this pull request Feb 27, 2020
Add link to the PR for tests:
tc39/test262#2514

Closes #5.
@leobalter leobalter changed the base branch from master to main July 15, 2020 17:39
@leobalter
Copy link
Member

FYI, I updated the base branch from master to main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants