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

Ensure unique contexts #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

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.

1 participant