Fix fedify/next test-each failure, add fedify/next tests - #978
Conversation
✅ Deploy Preview for fedify-json-schema canceled.
|
📝 WalkthroughWalkthroughThe pull request adds Next.js integration tests for request routing and custom handlers. It adds Node.js and Bun test scripts. The shared ChangesNext.js runtime tests
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
|
Next.js does not work well with Deno. Seriously. Instead of adding deno.json to |
8b26d33 to
b84059d
Compare
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 `@mise.toml`:
- Around line 308-312: Update the package loop condition around the Deno
commands to require both the package-local packages/($pkg)/deno.json and
membership in the root deno.json workspace; only then run mise run check-each
and deno task --filter. Keep packages lacking either configuration out of this
Deno task path.
🪄 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: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 25562d94-d015-474f-ad9a-4ec3cfec14cd
⛔ Files ignored due to path filters (1)
deno.lockis excluded by!**/*.lock
📒 Files selected for processing (3)
mise.tomlpackages/next/package.jsonpackages/next/src/index.test.ts
b84059d to
fe605d1
Compare
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 `@packages/next/src/index.test.ts`:
- Around line 6-7: Replace the test import from `@fedify/fixture` with Node’s
built-in test harness by importing test from node:test in the package test file,
while preserving the existing assertions and test behavior.
🪄 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: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 2292e827-1479-4eeb-a805-b0a3e002baf4
📒 Files selected for processing (3)
mise.tomlpackages/next/package.jsonpackages/next/src/index.test.ts
2chanhaeng
left a comment
There was a problem hiding this comment.
Great work! Please check the point that I commented on.
2chanhaeng
left a comment
There was a problem hiding this comment.
Please add packages/next to test.exclude in root deno.json
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 `@packages/next/package.json`:
- Line 62: Update the test scripts in packages/next/package.json by adding
pretest and pretest:bun hooks that run pnpm build, matching the packages/amqp
pattern so dist/ is built before pnpm test or the Bun test command executes.
🪄 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: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 907b44d1-6698-4b78-8c5d-8e8ed8bdf9cc
📒 Files selected for processing (3)
deno.jsonmise.tomlpackages/next/package.json
|
I made a change! Please take an another look! |
2chanhaeng
left a comment
There was a problem hiding this comment.
Great work! Thanks for your contribution!
|
Oh, before merging this PR, please rebase from the main branch. Thanks! |
36928d9 to
c933943
Compare
- add next as dependency and deno.json - skip Deno tests for packages without deno.json - add test scripts in next/package.json Assisted-by: OpenCode:gpt-5.6-terra
Assisted-by: OpenCode:gpt-5.6-terra
c933943 to
6f7a221
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Closes #976, #869, #870, #868, #866, #867
Description
packages/next/src/index.test.tsto cover federation request detection, NodeInfo route handling, middleware delegation, and custom error handling logic.mise.tomltest runner to only run Deno tests if adeno.jsonfile exists for the package, and to always run Node.js and Bun tests with clear output messages.Github Copilot helped me making title of this PR, gpt-5.6-terra helped checking code quality and code creation.