-
Notifications
You must be signed in to change notification settings - Fork 0
feat: allow custom asserts via a .js test config file #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughTwo changesets document package updates including a feature for processing JavaScript and JSON testconfig files and internal documentation fixes. Updated release workflow to ignore CodeRabbit outputs. Enhanced test configuration loading in CLI. Refactored documentation link and path resolution with new helper functions for cleaner path handling. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.changeset/brown-pugs-add.md(1 hunks).changeset/salty-parrots-matter.md(1 hunks).github/workflows/release.yml(1 hunks)packages/cli/src/commands/test/implementation/test.ts(3 hunks)packages/core/src/features/internal-docs/index.ts(4 hunks)packages/core/src/implementations/generate-internal-docs.ts(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
packages/cli/src/commands/test/implementation/test.ts (1)
packages/cli/src/node-config-storage.ts (1)
readFile(269-271)
🔍 Remote MCP DeepWiki
Summary of Relevant Context for PR Review
Based on my research of the repository, here are the key insights for reviewing this PR:
Test Configuration Enhancement
The current test configuration system loads JSON files specified via the --test-config-path option, parsing them with JSON.parse() to define API endpoints, methods, headers, query parameters, request bodies, and custom assertions.
PR Impact: This PR extends that capability by allowing .js and .ts test config files (per the AI summary), enabling developers to programmatically define test configurations and implement custom assertions through JavaScript modules rather than static JSON. This is a significant feature enhancement that aligns with the changeset entry referencing "processing JavaScript and JSON testconfig files to enable advanced assertions."
Internal Documentation Generation Changes
The internal documentation generation creates Docsify-powered documentation by transforming workspace schema into browsable sites, with fixMarkdownLinks handling path normalization and ensuring README.md references resolve correctly with trailing slashes for Docsify directory-based navigation.
PR Impact: The changes to path handling (removeLeadingSrc, adjusting folder README paths) and link generation appear to fix inconsistencies in how documentation paths are resolved, particularly for folder-level README files. This aligns with the "minor fixes for the internal documentation generation" mentioned in the first changeset.
Release Workflow Changes
The Release workflow publishes packages to npm via the Changesets action and conditionally uploads documentation to GCP Storage only if packages were successfully published.
PR Impact: Removing the "Log Changesets outputs" and "Upload docs" steps (with the publish step now tagged with [@coderabbitai ignore]) suggests a deliberate shift—likely to streamline the workflow or move documentation updates to a separate process. This warrants verification that documentation deployment isn't impacted or that an alternative mechanism is in place.
🔇 Additional comments (10)
.changeset/salty-parrots-matter.md (1)
1-5: LGTM!The changeset entry correctly documents the new feature with an appropriate minor version bump for the CLI package.
.github/workflows/release.yml (1)
49-49: LGTM!The addition of the
[@coderabbitai ignore]tag to the release step title is appropriate for excluding automated review of release PRs..changeset/brown-pugs-add.md (1)
1-6: LGTM!The changeset entry correctly documents the internal documentation fixes with appropriate patch version bumps.
packages/cli/src/commands/test/implementation/test.ts (2)
2-2: LGTM!The
pathimport is correctly added to support the new test config loading functionality.
103-103: LGTM!The integration of
loadTestConfiginto the test execution flow is correct, with properawaitusage.packages/core/src/features/internal-docs/index.ts (2)
217-219: LGTM!The
removeLeadingSrchelper correctly normalizes various path formats by stripping leadingsrc/prefixes, which is essential for consistent documentation path resolution.
242-242: LGTM!The path normalization using
removeLeadingSrcand the formatting improvement (added newline before "## Contents:") enhance the consistency and readability of generated folder documentation.Also applies to: 260-262
packages/core/src/implementations/generate-internal-docs.ts (3)
26-33: LGTM!The
getParentDirhelper correctly extracts the parent directory from a path, properly handling trailing slashes and edge cases.
42-77: LGTM!The enhanced
fixMarkdownLinksfunction now properly resolves relative links using the current file's context. The improved README.md handling ensures correct Docsify navigation with appropriate trailing slashes.
122-122: LGTM!The updated function call correctly passes
item.pathto enable context-aware relative link resolution in the markdown content.
|
Note Docstrings generation - SUCCESS |
Docstrings generation was requested by @MihalyToth20. * #167 (comment) The following files were modified: * `packages/cli/src/commands/test/implementation/test.ts` * `packages/core/src/features/internal-docs/index.ts` * `packages/core/src/implementations/generate-internal-docs.ts`
Summary by CodeRabbit
New Features
Bug Fixes
Chores