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

Enhance test coverage for get_vars_query(), assert_valid_queries(), validate_query(), basket_select() #2579

Open
4 tasks
manciniedoardo opened this issue Nov 27, 2024 · 1 comment
Labels

Comments

@manciniedoardo
Copy link
Collaborator

manciniedoardo commented Nov 27, 2024

Background Information

It would be great to get {admiral}'s test coverage to 100%. However, this should not come at the expense of development time/effort from {admiral} core developers. As such, I have made a set of issues tagged "Unit Tests" (such as this one for get_vars_query(), assert_valid_queries(), validate_query() and basket_select()) where users who wish to dip their feet into the {admiral} ecosystem can:

  • Learn a bit about unit testing for R packages
  • Make a meaningful contribution to {admiral}

by adding or modifying unit tests to account for lines not previously covered.

Important note: Given the above, this issue is for newcomers to {admiral} or users who wish to contribute to the package, and should not be taken on by core {admiral} developers.

Definition of Done

  • Unit test(s) added/modified to test the lines in red in get_vars_query():
    image

  • Unit test(s) added/modifiedto test the lines in red in assert_valid_queries():
    image

  • Unit test(s) added/modified to test the lines in red in validate_query():
    image

  • Unit test(s) added/modified to test the lines in red in basket_select():
    image

@jimrothstein
Copy link
Collaborator

Enhance code coverage for assert_db_requirements has moved to issue #2636.
Continue here with remainder of functions.

@bms63 bms63 changed the title Enhance test coverage for get_vars_query(), assert_valid_queries(), assert_db_requirements(), validate_query(), basket_select() Enhance test coverage for get_vars_query(), assert_valid_queries(), ~assert_db_requirements()~, validate_query(), basket_select() Jan 15, 2025
@bms63 bms63 changed the title Enhance test coverage for get_vars_query(), assert_valid_queries(), ~assert_db_requirements()~, validate_query(), basket_select() Enhance test coverage for get_vars_query(), assert_valid_queries(), validate_query(), basket_select() Jan 15, 2025
bundfussr added a commit that referenced this issue Jan 22, 2025
…2579) (#2638)

* 2636 add tests #24 #25 to enhance code coverage

* 2636 fix test to for  is NULL

* #2636 Test #24 test error when `fun` is NULL

* # 2636 Correct lintr error (lines <101 characters)

* # 2636 fix styler error

* # 2636 lint

* Update tests/testthat/test-create_query_data.R

Co-authored-by: Stefan Bundfuss <[email protected]>

* #2636 enhance_tests_assert_db_requirements: move test and update snaps

* #2636 enhance_tests_assert_db_requirements: fix lintr

---------

Co-authored-by: Stefan Bundfuss <[email protected]>
Co-authored-by: Stefan Bundfuss <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants