When running my unit tests, ComponentResources def...
# typescript
l
When running my unit tests, ComponentResources defined in another package / workspace are not going through the
newResource()
faking function. If I copy code from the other workspace to the one that the tests are in, it's fine. All the normal resources defined in the various providers are fine, but the ComponentResources in a sibling workspace aren't being initialized. This seems like an invocation problem; how do I ensure that Pulumi knows to instantiate the resource using my local newResource() function?
I'm seeing the same behaviour now with
random.RandomString()
, which is a CustomResource, not a ComponentResource.
If I define a ComponentResource that contains a RandomString. and write a unit test that awaits that value, all is well. If I move that ComponentResource to another workspace in the same repository, the value is always undefined.