You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing a script that returns a reference, the error that the testing framework gives is unclear:
- FAIL: testGetIterator
Execution failed:
error: slab (0x0.1055) not found: slab not found for stored value
--> tests/example_nft_test.cdc:262:12
Expected Behavior
Since scripts are normally allowed to return reference types, it would make sense to allow returning these types in the testing framework, or at least have a more clear error.
Steps To Reproduce
Run a script from the testing framework that returns a reference, like this one:
import "FungibleToken"
access(all) fun main(account: Address): &{FungibleToken.Balance} {
let vaultRef = getAccount(account)
.capabilities.borrow<&{FungibleToken.Balance}>(/public/flowTokenBalance)
?? panic("Could not borrow Balance reference to the Vault")
return vaultRef
}
Current Behavior
When executing a script that returns a reference, the error that the testing framework gives is unclear:
Expected Behavior
Since scripts are normally allowed to return reference types, it would make sense to allow returning these types in the testing framework, or at least have a more clear error.
Steps To Reproduce
Environment
- Network: Emulator github.com/onflow/cadence v1.0.0-preview.19 github.com/onflow/cadence-tools/test v1.0.0-preview.13 github.com/onflow/flow-emulator v1.0.0-preview.16
The text was updated successfully, but these errors were encountered: