Frontmatter
| id | 8817 |
| title | Fix Unhandled Rejections in Base.initAsync and DomEvents.initDomEvents |
| state | Closed |
| labels | bugtestingcore |
| assignees | tobiu |
| createdAt | Jan 19, 2026, 7:06 PM |
| updatedAt | Jan 19, 2026, 7:08 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8817 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 19, 2026, 7:08 PM |
Fix Unhandled Rejections in Base.initAsync and DomEvents.initDomEvents
tobiu assigned to @tobiu on Jan 19, 2026, 7:07 PM

tobiu
Jan 19, 2026, 7:07 PM
Input from Gemini 3 Pro:
✦ I have implemented the fixes for the unhandled rejections:
src/core/Base.mjs: Wrapped theinitAsynccall inconstructwith atry-catchblock to specifically swallowNeo.isDestroyederrors.src/mixin/DomEvents.mjs: Added a.catch()handler to thetimeoutpromise ininitDomEventsto swallowNeo.isDestroyederrors.Running
npm run test-unitnow results in 227 passed tests with no unhandled rejections or worker crashes. This stabilizes the entire unit test suite.
tobiu closed this issue on Jan 19, 2026, 7:08 PM
Unit tests were crashing with unhandled promise rejections (
Neo.isDestroyed) during component destruction, specifically ininitAsync(core.Base) andinitDomEvents(mixin.DomEvents). These crashes destabilized the test worker process, causing subsequent tests (likeProvider.spec.mjs) to fail with misleadingTypeError: Neo.setupClass is not a functionerrors due to environment pollution or partial module loading.Fixes:
initAsyncinsrc/core/Base.mjswith atry-catchblock to suppressNeo.isDestroyederrors..catch()block to the timeout promise insrc/mixin/DomEvents.mjsinitDomEventsto suppressNeo.isDestroyed.These changes ensure robust test execution and prevent cascading failures.