-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: broken tests #8401
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
Merged
Merged
fix: broken tests #8401
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9f3ad06
fix: broken tests
AmanVarshney01 8973d27
fix
AmanVarshney01 1536fe7
add explicit prisma generate command
AmanVarshney01 4e03e09
fix: update test scripts for Prisma v7 compatibility
AmanVarshney01 9f2f31c
fix sqlite import
AmanVarshney01 a3e1c15
remove idle timeout
AmanVarshney01 7932ed5
add longer timeout
AmanVarshney01 52cc2b8
convert tests to vitest
AmanVarshney01 738717a
remove useless files
AmanVarshney01 6c80655
fix ai slop
AmanVarshney01 bedf36e
simplify tests
AmanVarshney01 ba012ea
try concurrent test
AmanVarshney01 4c12264
simplify workflow
AmanVarshney01 7d9e857
test
AmanVarshney01 6e572e0
matrix tests
AmanVarshney01 eed0e1a
remove claude.md
AmanVarshney01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| lts/hydrogen | ||
| 22 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| # CLAUDE.md | ||
|
|
||
| This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. | ||
|
|
||
| ## Repository Overview | ||
|
|
||
| This is the official `prisma-examples` repository containing ready-to-run example projects demonstrating Prisma ORM, Prisma Accelerate, Prisma Optimize, and deployment patterns. Each example is self-contained with its own dependencies and documentation. | ||
|
|
||
| ## Directory Structure | ||
|
|
||
| - `/orm/` - Prisma ORM examples (fullstack and backend frameworks) | ||
| - `/accelerate/` - Prisma Accelerate examples (connection pooling and caching) | ||
| - `/optimize/` - Prisma Optimize examples (query performance) | ||
| - `/databases/` - Database-specific implementations (PostgreSQL, MongoDB, CockroachDB, etc.) | ||
| - `/deployment-platforms/` - Platform deployment patterns (AWS Lambda, Vercel, etc.) | ||
| - `/generator-prisma-client/` - Examples using the new `prisma-client` generator | ||
|
|
||
| ## Working with Individual Examples | ||
|
|
||
| Each example is independent. To run an example: | ||
|
|
||
| ```bash | ||
| cd orm/express # or any example directory | ||
| npm install | ||
| # Set up DATABASE_URL in .env (check example's README) | ||
| npx prisma migrate dev --name init | ||
| npx prisma db seed # if seed script exists | ||
| npm run dev | ||
| ``` | ||
|
|
||
| Common scripts across examples: | ||
| - `npm run dev` - Start development server | ||
| - `npm run build` - Build for production | ||
| - `npx prisma studio` - Open Prisma Studio | ||
| - `npx prisma migrate dev` - Create and apply migrations | ||
|
|
||
| ## Testing | ||
|
|
||
| Tests run via `.github/scripts/test-all.sh`. Each example has a corresponding test script at `.github/tests/{category}/{example}/run.sh`. | ||
|
|
||
| ### Running Tests Locally | ||
|
|
||
| Run all tests: | ||
| ```bash | ||
| ./run-all-tests.sh | ||
| ``` | ||
|
|
||
| Run a single example's test: | ||
| ```bash | ||
| bash .github/tests/orm/express/run.sh | ||
| bash .github/tests/orm/nextjs/run.sh | ||
| # etc. | ||
| ``` | ||
|
|
||
| Tests use `@prisma/dev` to spin up a temporary database. The test pattern: | ||
| 1. Start Prisma Dev server (provides DATABASE_URL) | ||
| 2. Install example dependencies | ||
| 3. Run migrations and seed | ||
| 4. Start the app | ||
| 5. Run health checks or Postman collections (in `.github/tests/postman_collections/`) | ||
| 6. Cleanup | ||
|
|
||
| ## Code Style | ||
|
|
||
| Prettier configuration (`.prettierrc`): | ||
| - No semicolons | ||
| - Single quotes | ||
| - Trailing commas | ||
|
|
||
| EditorConfig: 2 spaces, UTF-8, LF line endings | ||
|
|
||
| ## Adding New Examples | ||
|
|
||
| Per CONTRIBUTING.md: | ||
| 1. Open an issue first to discuss the example concept | ||
| 2. Follow the standard example structure: | ||
| - `package.json` with standard scripts | ||
| - `prisma/schema.prisma` with blogging domain (User/Post models) | ||
| - Clear README with setup instructions | ||
| - Test script in `.github/tests/` | ||
| 3. Use conventional commits | ||
|
|
||
| Example guidelines: | ||
| - Simple and minimal, focused on one Prisma use case | ||
| - READMEs must end with a running example | ||
| - Schema patterns should be consistent across similar examples | ||
|
|
||
| ## Node Version | ||
|
|
||
| Uses Node.js LTS/Hydrogen (v22) - see `.nvmrc` | ||
AmanVarshney01 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Key Prisma Packages | ||
|
|
||
| Most examples use: | ||
| - `prisma` - CLI | ||
| - `@prisma/client` - Database client | ||
| - `@prisma/adapter-pg` - PostgreSQL adapter (for driver adapters) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.