https://pulumi.com logo
#typescript
Title
# typescript
w

worried-engineer-33884

01/22/2020, 8:24 PM
I am having a problem using jest to write unit tests for a dynamic resource. when testing the outputs, e.g.:
Copy code
describe("my custom resource", () => {
    it("has outputs", function(done) {
        pulumi
            .all([myCustomResource.someOutput])
            .apply(([someOutput]) => {
                try {
                    assert.equal(someOutput, "foobar");
                    done();
                } catch (e) {
                    done(e);
                }
            });
    });
});
I am seeing these errors:
Copy code
Error calling "Runtime.evaluate(global.__inflightFunctions.id0)": Uncaught

      at node_modules/@pulumi/pulumi/runtime/closure/v8_v11andHigher.js:123:23
      at fulfilled (node_modules/@pulumi/pulumi/runtime/closure/v8_v11andHigher.js:18:58)

    Error calling "Runtime.evaluate(global.__inflightFunctions.id1)": Uncaught

      at node_modules/@pulumi/pulumi/runtime/closure/v8_v11andHigher.js:123:23
      at fulfilled (node_modules/@pulumi/pulumi/runtime/closure/v8_v11andHigher.js:18:58)

    Error calling "Runtime.evaluate(global.__inflightFunctions.id2)": Uncaught

      at node_modules/@pulumi/pulumi/runtime/closure/v8_v11andHigher.js:123:23
      at fulfilled (node_modules/@pulumi/pulumi/runtime/closure/v8_v11andHigher.js:18:58)
this seems to be specific to jest, i do not see this when using mocha