-
-
Notifications
You must be signed in to change notification settings - Fork 402
test: add integration tests for next js #1459
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
6c89a96
to
d965ac0
Compare
d965ac0
to
c853ea3
Compare
Pull Request Test Coverage Report for Build 15826402195Details
💛 - Coveralls |
* try to create a structure for the tests * separate jobs for different tests * ci fix --------- Co-authored-by: georgiy.rusanov <georgiy.rusanov@ringcentral.com>
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.
Pull Request Overview
This PR adds integration tests for Next.js to verify that Supabase-js works in a Next.js environment while also refactoring the test suite and CI workflow for improved maintainability.
- Updated relative import paths in unit and type tests to reflect a new project structure.
- Introduced a new Next.js integration test app with Playwright tests and supporting configuration files.
- Refactored the CI workflow to separate unit, Deno, Node, and Next.js integration jobs.
Reviewed Changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
test/unit/.test.ts & test/types/.test-d.ts | Updated relative import paths to match new project structure. |
test/integration/next/**/* | Added a fully configured Next.js app with integration tests and configs. |
package.json | Updated test scripts to include unit, integration, and type checks. |
.github/workflows/ci.yml | Refactored CI jobs to split test execution into distinct workflows. |
npm test || npm test | ||
npm clean-install | ||
npm run build | ||
npm run test:integration || npm run test:integration |
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.
The use of '|| npm run test:integration' is redundant since it repeats the same command; consider removing the redundancy to improve readability.
npm run test:integration || npm run test:integration | |
npm run test:integration |
Copilot uses AI. Check for mistakes.
|
||
- name: Run tests | ||
- name: Run integration and browser tests on Deno 2.x only | ||
if: ${{ matrix.deno == '2.x' }} | ||
run: | | ||
npm run test:integration || npm run test:integration |
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.
The duplicate execution using the '||' operator is unnecessary here as well; removing the duplicate command can simplify the CI script.
npm run test:integration || npm run test:integration | |
npm run test:integration |
Copilot uses AI. Check for mistakes.
What kind of change does this PR introduce?
tests and ci refactor
What is the current behavior?
We currently don't test the integration between Supabase and Next.js.
What is the new behavior?
Add a new Next.js application under the
tests/next
folder that imports the local Supabase library and runs a simple application for making sure Supabase-js can be used in a Next.js app.Update the CI workflow for automating the assertion that Supabase integrates with Next.js, and also separate the other kind of tests into multiple steps for better maintainability.
Additional context
Add any other context or screenshots.