Skip to content

Add dedicated tests for theme/aesthetic helper functions #523

@utkarshpawade

Description

@utkarshpawade

The exported helpers plot_bg(), panel_bg(), facet_bg(), legend_move(), legend_text(), and overlay_function() appear in test-convenience-functions.R but coverage is minimal. tests only check parameter forwarding via expect_identical().

No tests currently verify:

  • Return types : background helpers return incomplete theme objects; overlay_function() returns a LayerInstance
  • on = FALSE : that the correct element is set to element_blank
  • Composition : adding helpers to bayesplot plots (e.g. ppc_hist(...) + plot_bg(fill = "gray")) doesn't error
  • Edge cases : legend_move("none") behaving like legend_none()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions