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

Abstract shared behavior from tests #568

Open
RiccardoBiosas opened this issue May 10, 2022 · 0 comments
Open

Abstract shared behavior from tests #568

RiccardoBiosas opened this issue May 10, 2022 · 0 comments
Assignees

Comments

@RiccardoBiosas
Copy link
Contributor

Context
The current unit/integration tests of the protocol are very extensive and meticulous, however their main 'side-effect' is that they repeat the same assertions to test different scenarios both across the same test suite and different files (i.e.: here and here).
This would make the tests quite difficult to refactor should there be any changes in the business logic of the protocol in the future, and it also makes their code readability quite daunting.
Also some chai matchers are imported on a file-basis rather than being defined globally.

Proposal
Define the shared behavior of the tests and abstract it away in separate classes by using Mocha contexts.

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

No branches or pull requests

2 participants