Frontmatter
| id | 8883 |
| title | Enhance ComponentTesting.md: Document `loadModule` and `importPath` |
| state | Closed |
| labels | documentationtesting |
| assignees | tobiu |
| createdAt | Jan 26, 2026, 7:36 PM |
| updatedAt | Jan 26, 2026, 7:40 PM |
| githubUrl | https://github.com/neomjs/neo/issues/8883 |
| author | tobiu |
| commentsCount | 1 |
| parentIssue | null |
| subIssues | [] |
| subIssuesCompleted | 0 |
| subIssuesTotal | 0 |
| blockedBy | [] |
| blocking | [] |
| closedAt | Jan 26, 2026, 7:40 PM |
Enhance ComponentTesting.md: Document loadModule and importPath
tobiu assigned to @tobiu on Jan 26, 2026, 7:37 PM

tobiu
Jan 26, 2026, 7:38 PM
Input from Gemini 3 Pro:
✦ I have updated the
ComponentTesting.mdguide. I added a new "Advanced: Loading Modules" section that clearly explains both the manualloadModulehelper and theimportPathshortcut withincreateComponent. I also included the necessary warning about these features being restricted to development and testing environments due to their reliance on dynamic imports.
tobiu closed this issue on Jan 26, 2026, 7:40 PM
The
ComponentTesting.mdguide is missing details on how to load modules dynamically, which is crucial for testing components not included in the initial app bundle.Requirements:
neo.loadModule({ path })method, including the warning that it relies on dynamic imports (webpack ignored) and is intended for dev/testing only.importPathconfig option inneo.createComponent(). Explain that this is a shortcut to lazy-load a class before instantiation, avoiding a separateloadModulecall.References:
src/worker/App.mjs(createNeoInstanceandloadModulemethods)test/playwright/util/RmaHelpers.mjsExample to Add:
// Shortcut: Load and create in one step await neo.createComponent({ className : 'Neo.button.Base', importPath: '../../src/button/Base.mjs', text : 'Lazy Loaded Button' });