diff --git a/tests/bruno/e2e/udt/14-node2-list-channel-expect-two-channel.bru b/tests/bruno/e2e/udt/14-node2-list-channel-expect-two-channel.bru index b84a84e8..343d82f1 100644 --- a/tests/bruno/e2e/udt/14-node2-list-channel-expect-two-channel.bru +++ b/tests/bruno/e2e/udt/14-node2-list-channel-expect-two-channel.bru @@ -37,7 +37,8 @@ script:post-response { // Sleep for sometime to make sure current operation finishes before next request starts. await new Promise(r => setTimeout(r, 2000)); console.log("accept channel result: ", res.body.result.channels); - if (res.body.result.channels.length != 2) { + const readyChannels = res.body.result.channels.filter(channel => channel.state.state_name === "CHANNEL_READY"); + if (readyChannels.length != 2) { throw new Error("Assertion failed: expect there are 2 channels"); } }