F
Flow8mo ago
joshua

joshua | Flow (2025-05-06)

Is there a way to import struct definitions from scripts into the cadence testing framework so I can access their fields in my tests? I can't find any examples
8 Replies
Needle
Needle8mo ago
I've created a thread for your message. Please continue any relevant discussion in this thread. You can rename this thread using /title <new title>
joshua
joshuaOP8mo ago
@Giovanni S do you know?
Giovanni S
Giovanni S8mo ago
I don't belive so since the type isn't defined in an importable file. It would have to be a struct defined in a contract
joshua
joshuaOP8mo ago
Darn
Giovanni S
Giovanni S8mo ago
Agreed. It'd be nice if you could at least access the fields or reconstruct the type if it has identical fields
joshua
joshuaOP8mo ago
@Cadence is there an open issue for this already?
Unknown User
Unknown User8mo ago
Message Not Public
Sign In & Join Server To View
turbolent
turbolent8mo ago
I don't quite know the details about the testing framework, i.e. if that's possible or there's an issue for it. Please create one if you can't find one, and ideally add the reason why this would be helpful

Did you find this page helpful?