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

Return descriptive error messages #112

Open
bartolomej opened this issue Jun 19, 2022 · 0 comments
Open

Return descriptive error messages #112

bartolomej opened this issue Jun 19, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@bartolomej
Copy link
Contributor

Problem

I've encountered multiple scenarios where a non-descriptive error message gets thrown. One such case was when I renamed my contract (from TeaProfile to FlowTea) and forgot to also change the deployments info.

Actual deployment info:

"deployments": {
    "emulator": {
      "emulator-account": ["TeaProfile"]
    }
}

Should be:

"deployments": {
    "emulator": {
      "emulator-account": ["FlowTea"]
    }
}

When I ran my tests I got the bellow error instead of something more descriptive:

Cannot destructure property 'events' of 'e' as it is null.
TypeError: Cannot destructure property 'events' of 'e' as it is null.

Steps to Reproduce

  1. Create an invalid deployment configuration
  2. Run flow-js-testing tests (in my case the error was thrown on getAccountAddress("Name") call)

Context

I'm using flow-js-testing in Jest tests for our new project on Flow. We are in the process of developing a Cadence smart contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants