-
Notifications
You must be signed in to change notification settings - Fork 37
Description
👋 If you are interested in working on this issue, please check out the Getting Started guide on HackerEarth!
Description (Problem Statement)
The JS Testing Framework has two functions: sendTransaction and executeScript that currently return a single result from their execution. It does not have a good way of handling errors that should be caught and processed. This can cause issues with multiple interactions called in succession.
Experience Required
- Great proficiency with JavaScript
- Good understanding of Cadence and Flow JS SDK
Minimum Feature Set (Acceptance Criteria)
-
Catch error inside interaction code and always return tuple
[result, error]. -
This should make it easier to assert the result of interaction using jest and other libraries.
-
Flow Cadut interactions are already implemented in such a way (refer to this piece of code as an example - https://github.com/onflow/flow-cadut/blob/main/src/interactions.js#L55-L63) so it's mostly a refactoring task.
Extension Feature Set (Optional)
Parse error message and provide an error in form of an object, containing at least errorCode, message. If possible extract more information and format it in a human-readable and usable way.
Milestone Requirements
- Meet the minimum feature set and optionally the extension.
Software Requirements
Maintainability
Code should be written with best practices in mind.
Other Requirements
Documentation
- Documentation should be updated according to the changes made.
Code standards or guidelines
- Follow the general contribution guidelines.
Judging Criteria
- For all projects, technical & high-level judging criteria apply.
Resources
- General Resource Guide
- Flow JS Testing