Closed Skiyee closed 3 months ago
The recent changes improve the PageContext
class by filtering out subpages with no content, ensuring that empty subpages are not included in the configuration. Additionally, a new test has been added to validate the existence of pages during the route generation process, ensuring that the generated routes match the expected output.
Files | Change Summary |
---|---|
packages/core/src/context.ts |
Modified the PageContext class to filter out subpages with no content during the assignment of subPageMetaData . |
test/generate.spec.ts |
Added a test to check the existence of pages in a route generation process, validating the routes against a snapshot. |
sequenceDiagram
participant Developer
participant PageContext
participant SubPageScanner
participant RouteGenerator
participant TestRunner
Developer->>PageContext: Create PageContext instance
PageContext->>SubPageScanner: Scan for sub-pages
SubPageScanner->>PageContext: Return sub-page metadata
PageContext->>PageContext: Filter out subpages with no content
Developer->>RouteGenerator: Resolve routes using PageContext
RouteGenerator->>Developer: Return generated routes
Developer->>TestRunner: Run tests for route generation
TestRunner->>Developer: Validate routes against snapshot
Objective (Issue #166) | Addressed | Explanation |
---|---|---|
Filter out subpages with no content before generating the configuration | ✅ |
In the realm of code so bright,
A bunny hopped with pure delight,
It filtered pages, empty no more,
Ensuring routes were clean and sure.
With tests in place, the code did gleam,
A developer’s dream, a perfect scheme.
🐰✨
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
LGTM
Thank you!
😘
fix: #166
Summary by CodeRabbit
Bug Fixes
Tests