Skip to content

Remove defaults for private code #611

Closed
@novemberborn

Description

@novemberborn

AVA exposes two public interfaces: the CLI and the programmatic API. All other code is private. Currently a lot of the private code has defaults, e.g. Runner can be instantiated without options.

This tends to happen in tests and causes confusion where code has to be extra defensive against scenarios that wouldn't occur if defaults were set at the public interface level.

Allowing defaults throughout the code makes it hard to reason about expected values. I'm proposing we remove defaults from internal code and make our tests more explicit.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions