Re: [html-tests] Show the line where JSON.parse throw an error (#4314)

1. https://github.com/tc39/test262/search?utf8=✓&q=json.parse

For (2) and (3), while having line numbers certainly seems like a useful thing, the spec for this feature currently [has issues](https://github.com/whatwg/html/issues/958). There are also a bazillion things that can cause an error, and it doesn't scale well to copy-paste this test for each thing. The existing tests are mostly trying to cover each aspect of the HTML spec's requirements, but not testing each possible scenario for each requirement.

That said, testing multiple scenarios and in particular cases people run into that are a problem for them is great to have tests for. So I think:

* The existing test(s) should be modified to also test exact line (and column?), but those should probably be new separate `test()`s.
* We should figure out a way to test several scenarios for each test in a DRY way, so it's reasonably easy to maintain the tests. Maybe a build script could work? (Maybe this could be a follow-up though; if so, please file a new issue.)

View on GitHub: https://github.com/w3c/web-platform-tests/pull/4314#issuecomment-266436791

Received on Monday, 12 December 2016 13:57:09 UTC