chore(docs): add test command and configuration for vitest#91
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Enterprise Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughAdds Vitest configuration and CI wiring for projects/site, refines renderJsonLd breadcrumb construction to skip non-generated pages and use list-length-based positions, and adds Vitest tests validating breadcrumb omission and inclusion behaviors. ChangesVitest setup and breadcrumb testing
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@projects/site/src/_11ty/layouts/metadata.test.ts`:
- Around line 3-5: The test sets module-level environment stubs with vi.stubEnv
for ELEMENTS_SITE_URL and PAGES_BASE_URL which persist across suites; add an
afterAll hook in metadata.test.ts that restores those environment variables
(either by calling vi.unstubAllEnvs() if available or by deleting/resetting
process.env.ELEMENTS_SITE_URL and process.env.PAGES_BASE_URL) so the stubs are
cleaned up after tests; reference the existing vi.stubEnv calls to place the
afterAll close to them.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Enterprise
Run ID: 760ca62d-33d4-4029-95dd-3186fd3f3f5e
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (4)
projects/site/package.jsonprojects/site/src/_11ty/layouts/metadata.jsprojects/site/src/_11ty/layouts/metadata.test.tsprojects/site/vitest.config.ts
- Introduced a new test command in package.json to run tests using vitest. - Updated CI configuration to include the test command as a dependency. - Modified metadata.js to ensure correct breadcrumb item positioning and generation logic. Signed-off-by: Cory Rylan <crylan@nvidia.com>
273940d to
dece399
Compare
|
🎉 This issue has been resolved in version 0.0.11 🎉 |
|
🎉 This issue has been resolved in version 0.1.2 🎉 |
|
🎉 This issue has been resolved in version 0.2.0 🎉 |
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Chores