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