Skip to content

Deep clone the options object so we don't mutate it. See #55 #140

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

Merged
merged 1 commit into from
Apr 19, 2021

Conversation

tkadlec
Copy link
Contributor

@tkadlec tkadlec commented Apr 16, 2021

Currently, the wrapper mutates the options object when it's passed in. This means that if you're using a loop to do any bulk testing, the pollResults and timeout options exponentially increase (as the values are converted from seconds to milliseconds over and over).

This PR introduces a deepClone method to first clone the options object before altering it in anyway and should close #55.

@tkadlec tkadlec requested review from marcelduran and pmeenan April 16, 2021 13:59
@tkadlec tkadlec merged commit 4ed3807 into master Apr 19, 2021
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

Successfully merging this pull request may close these issues.

2nd test run with same options object
2 participants