Skip to content

Adding unit tests for tm_merge#73

Merged
donyunardi merged 10 commits intomainfrom
add_unit_tests@main
May 7, 2026
Merged

Adding unit tests for tm_merge#73
donyunardi merged 10 commits intomainfrom
add_unit_tests@main

Conversation

@donyunardi
Copy link
Copy Markdown
Contributor

@donyunardi donyunardi commented May 6, 2026

Fix part of https://github.com/insightsengineering/coredev-tasks/issues/750

  • Adding unit tests for tm_merge()
  • Minor update to the function to remove ambiguity (using different variable name than id in lapply)
image
image

donyunardi and others added 4 commits May 6, 2026 11:49
…oups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),701(com.apple.sharepoint.group.1),33(_appstore),98(_lpadmin),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh),400(com.apple.access_remote_ae) in lapply variable
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

badge

Code Coverage Summary

Filename                  Stmts    Miss  Cover    Missing
----------------------  -------  ------  -------  -------------------------------------------------------------
R/as_picks.R                140      21  85.00%   63, 167-171, 182-186, 201-207, 229-231
R/assertion.R                 5       0  100.00%
R/call_utils.R              147      22  85.03%   23-28, 65, 132-138, 259, 279-280, 283-287, 292
R/helpers.R                  12      12  0.00%    4-15
R/interaction.R              42       1  97.62%   95
R/module_merge.R            257       2  99.22%   328, 607
R/module_picks.R            318      23  92.77%   47-53, 71, 109-110, 298-300, 302-306, 429, 478, 516, 528, 536
R/picks.R                   183       1  99.45%   335
R/print.R                    36       2  94.44%   50, 58
R/resolver.R                141      15  89.36%   110-118, 284-289
R/tidyselect-helpers.R       29       0  100.00%
R/tm_merge.R                 54       0  100.00%
R/ui_containers.R            42       0  100.00%
R/zzz.R                       5       5  0.00%    3-11
TOTAL                      1411     104  92.63%

Diff against main

Filename             Stmts    Miss  Cover
-----------------  -------  ------  --------
R/helpers.R             +3     +12  -100.00%
R/module_picks.R        -5       0  -0.11%
R/tm_merge.R             0     -54  +100.00%
R/ui_containers.R      -13       0  +100.00%
TOTAL                  -15     -42  +2.87%

Results for commit: 8bb0fb1

Minimum allowed coverage is 80%

♻️ This comment has been updated with latest results

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Unit Test Performance Difference

Test Suite $Status$ Time on main $±Time$ $±Tests$ $±Skipped$ $±Failures$ $±Errors$
badge_dropdown 👶 $+0.18$ $+1$ $+1$ $0$ $0$
tm_merge 👶 $+1.21$ $+25$ $0$ $0$ $0$
Additional test case details
Test Suite $Status$ Time on main $±Time$ Test Case
assertion 💀 $0.02$ $-0.02$ unnamed
badge_dropdown 👶 $+0.18$ shinytest2_badge_dropdown_is_visible_when_clicking_on_it_multiple_times
tm_merge 👶 $+0.01$ tm_merge_returns_a_module_with_a_custom_label
tm_merge 👶 $+0.01$ tm_merge_returns_a_module_with_custom_transformators_when_provided
tm_merge 👶 $+0.01$ tm_merge_returns_a_module_with_empty_transformators_by_default
tm_merge 👶 $+0.01$ tm_merge_returns_a_module_with_picks_passed_to_server_args
tm_merge 👶 $+0.01$ tm_merge_returns_a_module_with_picks_passed_to_ui_args
tm_merge 👶 $+0.01$ tm_merge_returns_a_module_with_the_default_label
tm_merge 👶 $+0.01$ tm_merge_returns_a_teal_module
tm_merge 👶 $+0.08$ tm_merge_server_initializes_without_error
tm_merge 👶 $+0.24$ tm_merge_server_output_mapped_renders_YAML_containing_the_selected_variable_names
tm_merge 👶 $+0.21$ tm_merge_server_output_src_contains_the_selected_variable_name
tm_merge 👶 $+0.21$ tm_merge_server_output_table_merged_renders_an_HTML_table_containing_selected_variables
tm_merge 👶 $+0.27$ tm_merge_server_server_handles_multiple_picks_from_separate_datasets_with_join_keys
tm_merge 👶 $+0.01$ tm_merge_ui_includes_the_join_keys_output_element
tm_merge 👶 $+0.01$ tm_merge_ui_includes_the_mapped_output_element
tm_merge 👶 $+0.01$ tm_merge_ui_includes_the_src_output_element
tm_merge 👶 $+0.02$ tm_merge_ui_includes_the_table_merged_output_element
tm_merge 👶 $+0.03$ tm_merge_ui_labels_each_panel_with_the_pick_name
tm_merge 👶 $+0.02$ tm_merge_ui_renders_one_panel_per_pick
tm_merge 👶 $+0.02$ tm_merge_ui_returns_a_shiny_tag

Results for commit bd10e2a

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Unit Tests Summary

  1 files   11 suites   19s ⏱️
275 tests 261 ✅ 14 💤 0 ❌
409 runs  394 ✅ 15 💤 0 ❌

Results for commit 8bb0fb1.

♻️ This comment has been updated with latest results.

@osenan osenan self-assigned this May 7, 2026
Copy link
Copy Markdown
Contributor

@osenan osenan left a comment

Choose a reason for hiding this comment

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

Thanks for the tests. Overall they are ok. I have added minor suggestions.

Comment thread tests/testthat/test-tm_merge.R Outdated
Comment thread tests/testthat/test-tm_merge.R Outdated
Comment thread tests/testthat/test-tm_merge.R Outdated
@donyunardi
Copy link
Copy Markdown
Contributor Author

Thanks for the review @osenan!

@donyunardi donyunardi merged commit 2dc75be into main May 7, 2026
27 of 28 checks passed
@donyunardi donyunardi deleted the add_unit_tests@main branch May 7, 2026 21:50
@github-actions github-actions Bot locked and limited conversation to collaborators May 7, 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