You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature: In-Browser Mocha Test Tab with Editor and Terminal Results for @knighted/develop #19
Feature Proposal: In-Browser Mocha Test Tab with Editor and Terminal Output
Summary:
Requesting the addition of a new "Test" tab to @knighted/develop, enabling users to write and run Mocha tests directly in the browser, in line with the project's CDN-first and no-build philosophy.
Requirements
Test Tab UI: A dedicated tab alongside existing JSX/CSS panels, labeled "Test".
Test Editor: Integrated browser editor for authoring Mocha/Chai test code. Syntax highlighting and resizing preferred but not required initially.
Terminal-Style Output: Below or beside the editor, display a terminal-like view or panel showing test run results, including pass/fail, errors, and stack traces, updated live during execution (mimic terminal/console output).
CDN Loading: All dependencies (mocha, chai) loaded via CDN with the existing fallback logic; no node_modules or bundling required.
Sandboxed Execution: Run test code in a sandboxed iframe or isolated environment to prevent polluting the IDE's main context. Allow re-running tests cleanly.
Component Integration: Provide access to the currently authored JSX and CSS modules in tests using the same Blob/module logic as the app preview.
Save/restore: Optionally, persist the user's test code in localStorage for session continuity.
UI Consistency: Ensure styling/theme matches or blends with the existing IDE, including dark mode support if possible.
Motivation
Increases utility and learning value of @knighted/develop as a playground and prototyping tool.
Provides instant feedback and reinforces testing culture without user needing any local toolchain or infrastructure.
Fully compatible with GitHub Pages/static hosting model.
Activity