-
Notifications
You must be signed in to change notification settings - Fork 452
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
annexB/B.2.1 and B.2.2 fail in node >= 0.11 (0.12, iojs) because 'escape' 'unescape' are non-enumerable #158
Comments
I guess precisely interpreting the spec language, node/io et al are free to do whatever they please since Annex B doesn't apply to them. That said, realistically it seems odd to implement the same behavior but with slight differences. In other words, if you're going to implement Annex B even if you're not required to, it should be per spec. It sounds like the test failures are correct from a test262 perspective, though. The only addition would be to flag annex B semantics so we can filter them in the harness (which I believe is an open item at this point). |
Which tests specifically? |
"normative but optional" means that you aren't required to implement it, but if you do you are expected to conform to the provided specification. I don't know why the current test is expecting enumerable: true. The ES6 spec. says in clause 17 "Every other data property described in clauses 18 through 26 and in Annex B.2 has the attributes { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: true } unless otherwise specified." Regarding, should you implement it...everything is Annex B is something that we wish we could get rid of, but can't because of web legacy compatibility issues. If you think you an get away without implementing them, that's what I recommend you do. The more non-browser platforms that implement then, the harder it will be to ever get rid of them. |
My mistake, the tests indeed specify |
With io.js 1.2.0 I see this:
While with the python runner (not updated to reflect needed changes in newer nodes, cf. bterlson/test262-harness#28 ) I see this:
|
When I rewrite the test B.2.1.js to have separate assertions instead of 4 tests combined with &&, I am seeing a failure in test262-harness on >= 0.11, but success with 0.10. Here's the test body I am using:
I will try to check this on a different system, in case the real problem is that my laptop is hosed. If anyone has the time to check this, I'd be grateful. |
Okay, I think I have a line on this now. There is an issue, but it's not between 0.10 and later versions, and it's not anything to do with whether |
Here's the regression between 0.10 and 1.2 0.10 -
iojs 1.2
|
Need some guidance on how to interpret Annex B.
TL;DR Should I submit a PR changing the tests to not require
global.escape
to be enumerable? Or should I submit a PR to node / iojs changingglobal.escape
back to enumerable? Or is everything fine? /cc @bterlson @domenic and maybe @rwaldronNote: this is an incorrect statement of the problem. More details below.
Current tests in
test232/master
require thatescape
andunescape
be enumerable properties of the global object. As of node 0.11 (and all subsequent node variants, including 0.12 and io.js), these are now declared asenumerable.false
:Causing the Annex B tests to fail. As I read the spec, the annex B tests don't apply to
node
at all – but is there any sort of requirement that if they choose to implement part of annex B, they must implement these functions as enumerable? Is there any requirement on browser implementers that these functions must be enumerable?The text was updated successfully, but these errors were encountered: