Skip to content

helper.settings() cannot be called more than once with the same settings instance as parameter #35

Open

Description

@cdlans

I am very happy that it is now possible to initialise the helper with settings. However I found out that calling helper.settings(userSettings) more than once with the same instance of userSettings will cause the helper.load() to fail. This will happen if one reuses the userSettings for multiple tests.

This is because the helper defines getters and setters on the userSettings.functionGlobalContext. When it tries to do so for the second time it throws an exception, because it cannot overwrite the getters and setters.

As a work-around, it is possible to pass in a new instance of userSettings (without getters and setters) to helper.settings() for every invocation.

Tests demonstrating this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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