Skip to content

Allow testing of private functions #104

Description

@decioferreira

Is your feature request related to a problem? Please describe.
I'm often frustrated when I want to write tests for internal helper functions but can't access them due to module encapsulation. This forces me to either expose functions I don't want to make part of the public API, give up on testing the given functions or move tests within modules.

Describe the solution you'd like
It would be great if Guida allowed testing private functions or modules in a clean and explicit way — for example, by having a mechanism (flag, annotation, or test-only import) to expose internal definitions during testing without making them publicly available in the actual package/app interface.

Describe alternatives you've considered
These are known in elm/test: expose functions I don't want to make part of the public API, give up on testing the given functions or move tests within modules.

Related Elm Features
Elm has no built-in way to test private functions afaik.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Fields

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions