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

Fix 1065 to improve code coverage for with_opt.R to 100% #1066

Merged
merged 3 commits into from
Aug 8, 2023

Conversation

ilyaZar
Copy link
Contributor

@ilyaZar ilyaZar commented Jul 6, 2023

Fix #1065

Done:

  • change filename: {testthat} style suggests "test-with_opt.R" as a file name for tests of functions from "R/with_opt.R" 7f5d6d2

  • improve tests for maintenance mode to see whether it works with setting options in a fresh golem 7f5d6d2

  • add tests for SHINY_PORT 7f5d6d2 and 5d09b49

  • get_golem_options is tested by temporarily altering shiny:::.globals variable 1b83332

  • corner case with the print=TRUE-flag in with_golem_options() is tested by temporarily overwriting S3-method shiny:::print.shiny.appobj() 5d09b49

To-Do / Note keeping:

Full coverage reached for file R/with_opt.R:
image

- change filename: testthat style suggets naming "tests/test-with_opt.R" to test functions in a file named "R/with_opt.R"
- improve tests for maintenance mode to see whether it works with setting options in a fresh golem
- add tests for "SHINY_PORT"

Refs: ThinkR-open#1065
Add a test for get_golem_options() function which was untested before.
- formatting with grk
- update comments to explain the test
- update the SHINY_PORT test to actually test the behaviour properly
- add a new test to check whether print=TRUE works inside with_golem_options()
@ilyaZar ilyaZar changed the title Fix 1065 to improve code coverage for with_opt.R up to 100% Fix 1065 to improve code coverage for with_opt.R to 100% Jul 7, 2023
@VincentGuyader
Copy link
Member

we'll be watching all the submissions very closely, thanks a lot!

@ilyaZar
Copy link
Contributor Author

ilyaZar commented Jul 28, 2023

thanks @VincentGuyader

@VincentGuyader VincentGuyader changed the base branch from dev to dev_1065 August 8, 2023 12:43
@VincentGuyader VincentGuyader merged commit 6ac14ff into ThinkR-open:dev_1065 Aug 8, 2023
VincentGuyader added a commit that referenced this pull request Aug 8, 2023
…1080)

* tests: add tests to increase test coverage

- change filename: testthat style suggets naming "tests/test-with_opt.R" to test functions in a file named "R/with_opt.R"
- improve tests for maintenance mode to see whether it works with setting options in a fresh golem
- add tests for "SHINY_PORT"

Refs: #1065

* tests: add tests to further increase coverage

Add a test for get_golem_options() function which was untested before.

* tests: test with_golem_options() with print=TRUE

- formatting with grk
- update comments to explain the test
- update the SHINY_PORT test to actually test the behaviour properly
- add a new test to check whether print=TRUE works inside with_golem_options()

Co-authored-by: Ilya Zarubin <[email protected]>
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.

2 participants