Repository navigation
Add JSONTestSuite parser tests - #231
DicksonWu654 wants to merge 2 commits into
Conversation
|
Thank you for the PR. JSONTestSuite is a good fit for stream-json, and the vendored files match upstream Test both parsers and both verifiersstream-json has four components that read JSON text: Split the test into four files, one per component. Near-identical copies are fine, and each file must run on its own with
What each file checksFeed every
The JSONC files expect the same outcomes, except that seven
The two parser files also keep the I ran these checks locally against READMEExpand
|
Expand JSONTestSuite coverage across the JSON and JSONC parsers and verifiers.
|
Thanks so much for the detailed review! Pushed 96939ca with the four standalone files, each feeding every test_parsing file as one chunk and one byte per chunk, the pinned i_ outcomes and the seven JSONC exceptions. The README now covers everything on your list. All four pass on their own with |
This adds JSONTestSuite as a regression test.
tests/node/test-json-test-suite.jsstreams each raw file through the parser. The 318test_parsingcases have to match theiry_/n_labels, andi_cases can go either way. For the 22test_transformcases, it checks that anything accepted comes back stable through the stringer.1ef36fa01286573e846ac449e8683f8833c5b26aundertests/data/json-test-suite/with the MIT license. That's about 355 KB, no network needednpm testpasses (2,457 assertions)Happy to move the fixtures or trim anything if you'd like it organized differently