sparse-intern-71089
06/17/2020, 4:29 AMlittle-cartoon-10569
06/17/2020, 6:49 AMrunInPulumiStack()
can't wrap setMocks()
. I can't see a way to clear the fakes set up in setMocks()
. I might have to change npm run test
to run mocha once per .spec.ts file, instead of once.little-cartoon-10569
06/17/2020, 6:53 AMlittle-cartoon-10569
06/17/2020, 10:35 PMsetMocks
is visible across all test files and each call to setMocks
blats whatever was already in there.
For example, if in a.spec.ts I call pulumi.runtime.setMocks({ newResource: new_resource_a; call: call_a; })
and in b.spec.ts I do same except with new_resource_b
and call_b
, then the tests in a.spec.ts see the "correct" resources but they've been processed by new_resource_b
and call_b
.
I need to scope Pulumi (or at least its runtime) to a single file, since the implementations of those faking functions are contradictory and can't be merged.little-cartoon-10569
06/17/2020, 10:44 PMoptions
in runtime/settings.ts. I'm a JS/TS beginner, I don't know what to search for to figure out how to achieve that 😞little-cartoon-10569
06/18/2020, 3:24 AM