Skip to content

Abstract shared behavior from tests #568

@RiccardoBiosas

Description

@RiccardoBiosas

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions