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

Adds tests for Near.call #25

Merged
merged 10 commits into from
Jul 9, 2024
Merged

Adds tests for Near.call #25

merged 10 commits into from
Jul 9, 2024

Conversation

elliotBraem
Copy link
Contributor

@elliotBraem elliotBraem commented Jun 20, 2024

Implements tests for Near.call, according to #22

User is not logged in

  • should throw 'No wallet selected' error

User is logged in

Arguments: (contractName, methodName, args?, gas?, deposit?)

  • should throw error if appropriate arguments are not provided (over 5 args)
  • should open confirmation modal with appropriate details

Arguments: ({ tx })

  • should throw error if transaction object argument is invalid (single string provided)
  • should open confirmation modal with appropriate details

Arguments: [{ tx }, ...]

  • should open confirmation modal with appropriate details, multiple transactions

@jaswinder6991
Copy link

This looks good foundational work @elliotBraem. Thanks a lot.

I am working on Near.view tests.

I think we should split tests/vm/near.spec.js into near-call.spec.js, near-view.spec.js and so on.

@elliotBraem
Copy link
Contributor Author

elliotBraem commented Jul 6, 2024

Thanks @jaswinder6991! I've taken your recommendation and moved these tests to near-call.js

These tests should cover the most basic functionalities for Near.call now and should serve as a good foundation for further improvements

@elliotBraem elliotBraem marked this pull request as ready for review July 6, 2024 19:18
@elliotBraem elliotBraem merged commit e8070a2 into main Jul 9, 2024
1 check passed
@elliotBraem elliotBraem deleted the tests/near-call branch July 9, 2024 11:46
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.

3 participants