Closed ac10n closed 1 month ago
Hey @ac10n,
Here's what we've found so far:
In Beacon, we don't close the channel, allowing tabs to join and leave without worrying about whether the channel is open. However, we could call channel.close()
when running destroy
since the client instance will stop working afterward.
We tried this approach and encountered the error you linked in your PR. Then, we manually edited broadcast-channel.js
from node_modules
as you suggested. While this resolves the error, a new one appears: Jest has detected the following 2 open handles potentially keeping Jest from exiting: […]
.
At this point, I am unsure if all these issues are caused by Beacon. I wanted to open an issue with the BroadcastChannel's developers here, but it is not possible.
We are still investigating potential solutions. In the meantime, is this issue only affecting your tests, or are you also experiencing problems with Taquito?
Hey @IsaccoSordo,
I have not discovered anything on the test dapp. The only place where I saw an issue was with our unit test behaviour. We are currently putting a workaround to make sure the tests resolve and exit properly. While it not being a hard blocker, it's definitely not ideal. It could also have potential issues in the future that we aren't fully aware of yet.
You might be able to put issues in RxDB? I agree it seems strange that a public repo does not have issue tracking.
cc @ac10n
Hey @ac10n @dsawali, I have opened https://github.com/ecadlabs/taquito/pull/3015 to solve this issue. Tell me what you think
@ac10n I'm closing this issue since this pull request has been merged. Feel free to open another issue if anything else comes up.
Describe the bug (current behavior)
In Taquito unit tests, Jest is detecting open handles.
To Reproduce
git@github.com:ecadlabs/taquito.git
beacon-4.3.0-beta.0
npm ci
npm run build
npm run test -w packages/taquito-beacon-wallet
Expected (correct) behavior Jest should exit cleanly
Screenshots and/or logs
Environment
Additional context We will be creating a PR that shows our explorations to fix the problem. It is not a clean code contribution, just a POC.