This message was deleted.
# typescript
s
This message was deleted.
w
What kind of Pulumi unit test is this? Are you following the patterns in https://www.pulumi.com/docs/guides/testing/unit/, or something else? Note that the error here is that
name
is undefined - is that "expected" based on the surrounding code?
l
@white-balloon-205 this is a Mocha test. Within the
it
block, I started from this:
Copy code
network.name.apply((name) => {
    if (name == 'empty_network') {
        done()
    } else {
        done(new Error(`name is ${name}`))
    }
});
But this if/else block pattern is quite verbose for each test, so I tried to mix in
chai
. First revision:
Copy code
network.name.apply((name) => {
    name.should.equal('empty_network')
});
I dropped the
done
argument from the
it
function callback. This works. But an
Output
is
Promise
-like, so I tried the
eventually
feature from
chai
in a second revision:
Copy code
network.name.should.eventually.equal('empty_network')
But here I get a failure:
TypeError: {} is not a thenable.