sparse-intern-71089
05/07/2020, 9:09 PMwhite-balloon-205
name
is undefined - is that "expected" based on the surrounding code?limited-rainbow-51650
05/08/2020, 5:49 AMit
block, I started from this:
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:
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:
network.name.should.eventually.equal('empty_network')
But here I get a failure:
TypeError: {} is not a thenable.