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

test(jmespath): 100% coverage and spec compliance #2271

Merged
merged 8 commits into from
Mar 27, 2024
Merged

Conversation

dreamorosi
Copy link
Contributor

Description of your changes

This PR introduces the full test suite of the JMESPath utility.

The tests included in the PR reach 100% coverage as well as full compliance with the JMESPath specification. The latter point is achieved by adopting the official test suite, which according to the official website is a requisite for any library that wants to claims full compliance.

The test suite has been copied verbatim and adapted to the Jest test structure. The only meaningful change to the suite is the wording of the error messages thrown by the library, which have been adapted to fit the style of this project.

In addition to the compliance tests, found under the packages/jmespath/test/unit/compliance directory, I included also another catch-all test file that contains tests needed to reach 100% coverage of statements, lines, branches, and files.

Related issues, RFCs

Issue number: #2270

Checklist

  • My changes meet the tenets criteria
  • I have performed a self-review of my own code
  • I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my change is effective and works
  • The PR title follows the conventional commit semantics

Breaking change checklist

Is it a breaking change?: NO

  • I have documented the migration process
  • I have added, implemented necessary warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@dreamorosi dreamorosi self-assigned this Mar 25, 2024
@boring-cyborg boring-cyborg bot added the automation This item relates to automation label Mar 25, 2024
@pull-request-size pull-request-size bot added the size/XXL PRs with 1K+ LOC, largely documentation related label Mar 25, 2024
@dreamorosi
Copy link
Contributor Author

The tests are failing because #2265 and #2266 still need to be merged, once they are I'll rebase and they should pass.

sthulb
sthulb previously approved these changes Mar 27, 2024
@sthulb sthulb marked this pull request as ready for review March 27, 2024 09:45
@sthulb sthulb requested review from a team as code owners March 27, 2024 09:45
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
39.2% Duplication on New Code

See analysis details on SonarCloud

@sthulb sthulb merged commit fc37010 into main Mar 27, 2024
11 checks passed
@sthulb sthulb deleted the feat/jmespath_tests branch March 27, 2024 10:08
@dreamorosi dreamorosi linked an issue Mar 27, 2024 that may be closed by this pull request
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automation This item relates to automation size/XXL PRs with 1K+ LOC, largely documentation related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: reach 100% JMESPath test coverage & spec compliance
2 participants