Skip to content

Fix integration-suite put tests for writing relationships and sets#11

Open
sentientforest wants to merge 1 commit into
gundb:masterfrom
sentientforest:integration-suite-fix
Open

Fix integration-suite put tests for writing relationships and sets#11
sentientforest wants to merge 1 commit into
gundb:masterfrom
sentientforest:integration-suite-fix

Conversation

@sentientforest

Copy link
Copy Markdown
Contributor

The getGun() function appears to instantiate a new Gun instance each time it is called.
It is called in a beforeEach() block prior to each test and sets up the gun
variable with the instance.
However, in certain tests, getGun() is called separately midway through the test.
This looks to cause the test to try to assert data in a
different Gun instance than the data was written to prior in the test,
leading to a test failure.
Replacing the getGun() call in these tests with the gun variable instance
that was setup in the beforeEach block appears to fix the issue and make
the tests pass.

The getGun() function appears to instantiate a new Gun instance each time it is called.
It is called in a beforeEach() block prior to each test and sets up the gun
variable with the instance.
However, in certain tests, getGun() is called separately midway through the test.
This looks to cause the test to try to assert data in a
different Gun instance than the data was written to prior in the test,
leading to a test failure.
Replacing the getGun() call in these tests with the gun variable instance
that was setup in the beforeEach block appears to fix the issue and make
the tests pass.
@sjones6

sjones6 commented Feb 1, 2018

Copy link
Copy Markdown
Contributor

@oakenclast : Thanks so much for fixing this up! I'll take a look soon and merge this in.

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