Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Ensure unique contexts#10

Open
chrisbreiding wants to merge 1 commit into
masterfrom
ensure-unique-contexts
Open

Ensure unique contexts#10
chrisbreiding wants to merge 1 commit into
masterfrom
ensure-unique-contexts

Conversation

@chrisbreiding
Copy link
Copy Markdown

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant