Repository navigation
Add support for function type in TealAppDriver$new(app) - #1752
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Factory return-value handling and option forwarding introduce startup failures for documented inputs.
2 open issues
1 file not reviewed
man/TealAppDriver.Rd: Generated file
What changed in this PR
This PR extends TealAppDriver to accept application factories, supporting function-based setup for testing teal applications with shinytest2.
Changes:
- Accepts functions alongside preconstructed
teal_appobjects and updates option forwarding. - Corrects the load-timeout environment variable and a method-name typo in documentation.
- Documents factory support in the API reference and changelog.
| File | Description |
|---|---|
R/TealAppDriver.R |
Adds factory input handling, revises option forwarding, and corrects timeout and documentation typos. |
NEWS.md |
Announces function-based application support. |
man/TealAppDriver.Rd |
Updates accepted input types and corrects the documented method name. |
Review effort: Balanced
Code Coverage SummaryDiff against mainResults for commit: 82fee4d Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Unit Tests Summary 1 files 36 suites 2m 40s ⏱️ Results for commit 82fee4d. ♻️ This comment has been updated with latest results. |
Unit Test Performance Difference
Additional test case details
Results for commit b8e2a8f ♻️ This comment has been updated with latest results. |
138e781 to
e7ac4ae
Compare
|
It is the right direction to support a function in However, the function path added by this PR originally didn't work end to end. (1) shinytest2 only starts the app if the function returns a My commit wraps the function so a returned |
llrs-roche
left a comment
There was a problem hiding this comment.
Many thanks for the updates, just some last (hopefully) comments
llrs-roche
left a comment
There was a problem hiding this comment.
I think the work is done and can be merged.
One las last tweak, could you fix the links CI that is failing (tmc is not on pharmaverse)? Thanks!
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Pull Request
functions to be used as main argument inTealAppDriver#1753Note: we can replace
appargument (deprecating it) in favor of usingapp_dir, however, if we do that should we also accept path to directory as argument?Changes decription
functioninappargument ofTealAppDriver$new(app)shinytest2in package development and may be used to quiet some of the warnings