Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cdlans opened this issue Jul 15, 2019 · 0 comments

Comments

@cdlans
Copy link

cdlans commented Jul 15, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant