Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Cadence tests to latest API features (#161)
Preliminary work to update the Cadence tests to the upcoming API features. Most notable features include the ability to specify deployment addresses in `flow.json` config file, thus allowing developers to import the contracts under test, in their tests files. This allows the use of nested types defined in these contracts. E.g.: ```cadence let typ = Type<CapabilityDelegator.DelegatorUpdated>() let events = Test.eventsOfType(typ) Test.assertEqual(4, events.length) let event = events[3]! as! CapabilityDelegator.DelegatorUpdated Test.assert(event.isPublic == false) Test.assert(event.active == false) let capabilityType = Type<Capability<&ExampleNFT.Collection{NonFungibleToken.Provider}>>() Test.assertEqual(capabilityType, event.capabilityType) ``` The above snippet allows performing assertions on events payload.
- Loading branch information