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

Add "JSON superset" tests to the ES2016+ tab #1404

Merged
merged 1 commit into from Jan 12, 2019

Conversation

Projects
None yet
3 participants
@afmenez
Copy link
Contributor

afmenez commented Jan 10, 2019

This is the only Stage 4 proposal that has no tests yet. I ported both subtests from test262, so I believe they are correct.
I haven't run the tests on Safari, got the results from the release notes.

@afmenez

This comment has been minimized.

Copy link
Contributor

afmenez commented Jan 10, 2019

I believe it works on Babel 7 too, but now I don't know how to add the results with the core2/core3 complication.

@ljharb

ljharb approved these changes Jan 10, 2019

Copy link
Collaborator

ljharb left a comment

Seems useful to maybe also add a test that utilizes JSON functions? LGTM otherwise

@afmenez

This comment has been minimized.

Copy link
Contributor

afmenez commented Jan 10, 2019

Yes, it seemed strange to me that the test262 tests didn't mention any JSON. :)
The MDN documentation says that JSON.parse() works on all browsers, but just newer browsers support eval(), so I assumed that was the important test. But I don't know how to add JSON functions if they won't fail for old browsers.

@afmenez

This comment has been minimized.

Copy link
Contributor

afmenez commented Jan 10, 2019

Please note this comment on the Firefox bug:
"extend ECMA-262 syntax into a superset of JSON" is a somewhat obscure way to describe the effect of this change. I would instead suggest:

"JavaScript string literals may now directly contain U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR. As a consequence, JSON syntax is now a subset of JavaScript literal syntax."

@ljharb ljharb merged commit 29db20b into kangax:gh-pages Jan 12, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@afmenez afmenez deleted the afmenez:JSONsuperset branch Jan 14, 2019

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