openwallet-foundation / credo-ts

Typescript framework for building decentralized identity and verifiable credential solutions
https://credo.js.org
Apache License 2.0
273 stars 200 forks source link

Fix flaky tests that start event listener after performing an action #894

Closed TimoGlastra closed 1 year ago

TimoGlastra commented 2 years ago

We only start event listeners after an actions has been performed (sendProposal -> start proposal received listener) in most e2e tests, while we should be starting the listener before performing the action (start proposal received listener -> sendProposal) to prevent flaky tests.

I've fixed it for one file as example (#893 ), but we should look at all ICv2 and PPv2 tests (that's where we use evens A LOT).

2byrds commented 2 years ago

Timo started this work here: https://github.com/hyperledger/aries-framework-javascript/pull/893 I learned from that and added more ICv2 tests here: https://github.com/hyperledger/aries-framework-javascript/pull/966 We'll tackle PPv2 tests in another PR since that module has changed significantly.