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

Return descriptive error messages #112

@bartolomej

Description

@bartolomej

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions