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

New Language Neutral Test Suite (redux) #122

Merged
merged 2 commits into from
Jan 18, 2018

Conversation

xogeny
Copy link
Contributor

@xogeny xogeny commented Jan 18, 2018

(resubmitting this, something went wrong with the other branch)

The majority of test cases have been refactored from Javascript code into a canonical test case form and stored as JSON. This change makes it very easy for other implementation written in other languages to test compliance with jsonata. It also helps organize the tests into categories.

Included in this commit is a markdown file documenting the data files present in the new test suite.
Also included is a mocha test that executes all of the tests by looping over all the provided test case data.

It is important to emphasize that no tests were removed. They were only refactored into language neutral versions and a few lingering implementation specific versions. Furthermore, these changes preserve the current code coverage at 100% across the board.

Signed-off-by: Michael M. Tiller <[email protected]>

The majority of test cases have been refactored from Javascript code into
a canonical test case form and stored as JSON.  This change makes it very
easy for other implementation written in other languages to test compliance
with `jsonata`.  It also helps organize the tests into categories.

Included in this commit is a markdown file documenting the data files present
in the new test suite.

Also included is a mocha test that executes all of the tests by looping over all
the provided test case data.

It is important to emphasize that no tests were removed.  They were only
refactored into language neutral versions and a few lingering implementation
specific versions.  Furthermore, these changes **preserve the current code
coverage at 100% across the board**.
@xogeny
Copy link
Contributor Author

xogeny commented Jan 18, 2018

OK, I updated this pull requests rebasing it off of the singleton branch and improving the structure of the test suite data (IMHO).

All tests pass (including the new tests added on the singleton branch) and we still have 100% coverage.

Interestingly, no new tests were actually needed to get 100% test cases, just updated answers...but I added the new tests all the same.

@xogeny
Copy link
Contributor Author

xogeny commented Jan 18, 2018

This replaces PR #113, BTW.

@coveralls
Copy link

coveralls commented Jan 18, 2018

Coverage Status

Coverage remained the same at 100.0% when pulling 28410da on xogeny:test-suite-2 into 226f932 on jsonata-js:master.

@andrew-coleman andrew-coleman merged commit 3bbe7e3 into jsonata-js:master Jan 18, 2018
@andrew-coleman
Copy link
Member

@xogeny many thanks for contributing this change. This was a huge piece of work and as a result we have a really well structured test suite that can be used by multiple implementations.
Thanks again!

@mattbaileyuk
Copy link
Member

@xogeny I want to second @andrew-coleman; it was a big piece of work and a big step forward - many thanks!

@xogeny
Copy link
Contributor Author

xogeny commented Jan 18, 2018

@andrew-coleman @mattbaileyuk Happy to help. You've created a very compelling approach here so I can't help but want to see it move forward. I've got some other ideas for PRs. Hopefully you'll find those useful as well.

@mtiller mtiller deleted the test-suite-2 branch January 18, 2018 16:21
@xogeny xogeny mentioned this pull request Jan 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants