https://pulumi.com logo
#python
Title
# python
k

kind-jelly-61624

09/13/2022, 8:56 PM
Does anyone have experience writing unit tests for Component Resources? I’m wondering if it’s possible to mock the call as it would come via the sdk
l

limited-rainbow-51650

09/14/2022, 1:52 PM
Hello @kind-jelly-61624, I have a small example of mocking available here: https://github.com/ringods/pulumi-samples/blob/main/component-resource/test/network.spec.ts Hope this helps.
k

kind-jelly-61624

09/14/2022, 4:10 PM
Thanks @limited-rainbow-51650! This is great
l

limited-rainbow-51650

09/14/2022, 4:23 PM
Good to hear. Do reach out if you have additional questions.