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
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>
@Giovanni S do you know?
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
Darn
Agreed. It'd be nice if you could at least access the fields or reconstruct the type if it has identical fields
@Cadence is there an open issue for this already?
Unknown User•5w ago
Message Not Public
Sign In & Join Server To View
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