Skip to content

test: add new unit test in test case reconnect#1277

Open
diaslui wants to merge 2 commits into
peers:masterfrom
diaslui:master
Open

test: add new unit test in test case reconnect#1277
diaslui wants to merge 2 commits into
peers:masterfrom
diaslui:master

Conversation

@diaslui

@diaslui diaslui commented May 20, 2024

Copy link
Copy Markdown

What was added?
A new test named as: (reconnect => disconnect => destroy) has been added in the "reconnect" test case in the test/peer.spec.ts file

How important is this new test?
This new test is important because there were already other tests that analyzed cases such as disconnect => reconnect but not the opposite, reconnect => disconnect, which could allow bugs to pass after reconnecting and disconnecting. This was solved by adding the new test that checks if everything will be ok after reconnecting and disconnecting

What was done after implementing the new test?
After implementing the test, I analyzed whether it would fulfill its role by causing it to give an error on purpose, and I confirmed its effectiveness in avoiding future bugs after reconnecting and disconnecting, everything is ok.

It's OK, Tested and Approved
I hope you accept the PR with the test to avoid future bugs! Thank you for your attention
image

@diaslui diaslui left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After implementing the test, I analyzed whether it would fulfill its role by causing it to give an error on purpose, and I confirmed its effectiveness in avoiding future bugs after reconnecting and disconnecting, everything is ok.

@WofWca WofWca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IDK how valuable the test is, but its code looks fine.

Comment thread __test__/peer.spec.ts Outdated
@diaslui

diaslui commented May 22, 2024

Copy link
Copy Markdown
Author

the tabulation problem has been resolved
image

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