Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants