Skip to content

Conversation

@chrisbreiding
Copy link

I found that using Math.random() to create names for contexts would occasionally cause the same name to be generated, leading to the same context being used when the desire is to have different contexts. In some instances, this causes the isolated fake to be used in the place of the code-under-test, which of course causes the test to fail.

Using an incrementing number ensures a unique name is generated and, therefore, a unique context is created as desired.

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.

2 participants