fix(test): seed identity in MountedMiniapp beforeEach to kill a flaky exit
A mounted mini-app's fire-and-forget window.commons append/getPublicKey could still be in flight after beforeEach wiped the DB, throwing an unhandled IdentityMissingError that flipped the suite exit code ~1 in 3 runs despite all tests passing. Seeding an identity makes that late signed call resolve against the fresh DB. 8/8 runs green.
This commit is contained in:
1 parent
d22361a613
commit
812cec5281
1 file changed
+6
@@ -21,6 +21,12 @@ beforeEach(async () => {
|
||||
indexedDB.deleteDatabase(db.name);
|
||||
db.close();
|
||||
await db.open();
|
||||
// A prior test's mounted mini-app can still have a fire-and-forget
|
||||
// window.commons.eventlog.append(...)/getPublicKey() in flight after the DB
|
||||
// is wiped here; seeding an identity means that late call resolves against
|
||||
// the fresh DB instead of surfacing an unhandled IdentityMissingError that
|
||||
// flips the suite's exit code. Each test's own init() stays idempotent.
|
||||
await init();
|
||||
delete window.commons;
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user