Skip to content

Adds test for gtsummary module#975

Merged
m7pr merged 18 commits intotm_gtsummaryfrom
tests
Feb 5, 2026
Merged

Adds test for gtsummary module#975
m7pr merged 18 commits intotm_gtsummaryfrom
tests

Conversation

@llrs-roche
Copy link
Copy Markdown
Contributor

@llrs-roche llrs-roche commented Feb 3, 2026

Pull Request

Adds tests for #973

TODO:

  • Test input
  • Test UI
  • Test output

On a different PR:

  • Test decorators:
    • One
    • Multiple

@llrs-roche llrs-roche marked this pull request as draft February 3, 2026 10:15
@llrs-roche llrs-roche added the core label Feb 3, 2026
@llrs-roche
Copy link
Copy Markdown
Contributor Author

Test coverage is currently R/tm_gtsummary.R: 59.41%

Comment thread R/tm_gtsummary.R
Comment thread R/tm_variable_browser.R Outdated
Comment thread R/tm_gtsummary.R Outdated
Comment thread R/tm_gtsummary.R
Comment thread R/tm_gtsummary.R
Copy link
Copy Markdown
Contributor

@m7pr m7pr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@m7pr
Copy link
Copy Markdown
Contributor

m7pr commented Feb 4, 2026

@llrs-roche for the decorators tests we could use this snippet #973 (comment)

llrs-roche added a commit that referenced this pull request Feb 5, 2026
# Pull Request

check_decorators didn't raise the error that the decorators provided
included something for an object that shouldn't be decorated!

Before:

```r
check_decorators(list(plot = teal::teal_transform_module()), "plot")
## TRUE
check_decorators(list(plot = teal::teal_transform_module()), "table")
## TRUE
```


After:

```r
check_decorators(list(plot = teal::teal_transform_module()), "plot")
## TRUE
check_decorators(list(plot = teal::teal_transform_module()), "table")
## [1] "The `decorators` must be a named list from these names: table."
```

I haven't added tests as the functions are not exported but was found
while working on #975

Once accepted a PR on teal.modules.clinical should be opened with the
same changes

---------

Signed-off-by: Lluís Revilla <185338939+llrs-roche@users.noreply.github.com>
Co-authored-by: Marcin <133694481+m7pr@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@m7pr m7pr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@llrs-roche if you can resolve that, then I think we can merge

#975 (comment)

@m7pr m7pr marked this pull request as ready for review February 5, 2026 10:49
Signed-off-by: Lluís Revilla <185338939+llrs-roche@users.noreply.github.com>
@m7pr m7pr merged commit c500092 into tm_gtsummary Feb 5, 2026
1 check passed
@m7pr m7pr deleted the tests branch February 5, 2026 10:57
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 5, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants