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.
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 ofuserSettings
will cause thehelper.load()
to fail. This will happen if one reuses theuserSettings
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) tohelper.settings()
for every invocation.Tests demonstrating this issue.