- add wwvStaticCompiler to SDK vite/ subpath export [Minor] - export createPluginContext and PluginContext type from SDK [Minor] - update viteGlobals mapping for lucide-react [Patch] - overhaul all docs/ for decoupled plugin development workflow [Minor] - update README with new CLI-based plugin creation instructions [Minor] - fix marketplace load route CORS and error handling [Patch] - add test coverage for DeclarativePlugin edge cases [Patch] - bump root to v1.18.0, SDK to v1.5.0
1.2 KiB
1.2 KiB
Testing
WorldWideView maintains a robust Vitest testing infrastructure utilizing jsdom environments to mock browser globals and React Testing Library utilities for accurate integration flow testing.
The primary requirement is full test coverage over authentication routes, edge-case platform parsing, and API rate-limit security.
Test Types
- Unit Logic: Verifies math, utilities, and configuration mappings (e.g.
edition.test.ts). - Middleware Integration: Evaluates Request/Response blocks (e.g.
rateLimit.test.ts). - Component Mocking: Exercises the React ecosystem state behaviors (e.g.
DeclarativePlugin.test.ts).
Key Files
vitest.config.ts(lines 5-25): Defines the inclusion criteria spanningsrc/lib/**,src/core/**, andsrc/plugins/**.src/lib/rateLimit.test.ts(lines 15-60): Demonstrates test encapsulation regarding the Upstash Redis fallbacks.src/core/edition.test.ts(lines 10-30): Confirms valid feature flag evaluations across local/demo builds.
Running Tests
Run tests natively within the root directory utilizing pnpm:
# Execute standard test suite runs over all watched directories
pnpm test
# OR
vitest run