This message was deleted.
# typescript
s
This message was deleted.
l
If you're getting stack references, then it's not a unit test. You need to test at a different level.
Generally, you get stack references in your
index.ts
,
__main__.py
, or similar. These files are not units, and they're not unit-testable.
ComponentResources are ideal units for unit testing. ComponentResources should not get stack resources: the top program should do that, and pass the values into the ComponentResource constructors.
h
I was thinking of mocking the stack reference in this case. What you're saying makes sense, though
l
Pulumi has written the tests for stack references. You don't need to. Leave those out of the tests.