Skip to content

global configuration setter #812

Closed
Closed
@teobler

Description

@teobler

Describe the feature you'd like:

add an exported function for global configuration to override/setup default value.

Why

in some scenarios we may need to setup some config globally, like extend timeout for async utils.
But there is no way for these global setup. We can just set them one by one in each test.

Suggested implementation:

we can maintain a global config to be default value, then we can get default values from this global config instead of setup each function.
Then user can call global config function to override default config or just pass custom params when using a specific function during testing.
the priority will be: custom params > global config

Describe alternatives you've considered:

pass config params in each test.

Teachability, Documentation, Adoption, Migration Strategy:

No migration actions required by users. All the changes should not break any feature for current behavior.
Just adding a new API for setup config globally.

byw, I would have a try to add this feature and document if we decide to add this feature after discuss:)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions