Comments (5)
The issue might be caused by the Jest VSCode extension. I have installed it for another repo and did not realize it affects my rw repo. Now after disabling it, tests run smoothly so far. Please do not invest more time right now. Going to let you know if it worked properly.
from redwood.
Hi @dennemark I'm talking to the team about next steps -- it would be great to have some profiling or metrics about what is going on in tests (maybe we turn on api/Prisma logging during test runs?) but have to think of a way of capturing this info.
I may also make sense for me to schedule a call with you to see more of your test structure and discuss ways to optimize.
One question, did you try: https://docs.redwoodjs.com/docs/testing#describescenario---a-performance-optimization
However, there are some situations where you as the developer may want additional control regarding when the database is setup and torn down - maybe to run your test suite faster.
The describeScenario function is utilized to run a sequence of multiple tests, with a single database setup and tear-down.
Also, we know of some large apps using Prisma Mock https://github.com/demonsters/prisma-mock and don't use scenarios but rather https://www.prisma.io/docs/orm/prisma-client/testing/unit-testing (or a custom implementation of it).
Again, happy to discuss further.
FYI - When scenarios were first introduced in pre RW v1, these Prisma mocking tools didn't exist.
from redwood.
Hi,
Those are great recommendations! Not sure if mocking prisma will help with RLS, but i could try.
I think I will also try to go back to an older working branch and see how different prisma/rw versions affect it. Should have tried this before...
Lets try to reduce the possible reasons, then I would be up for a call :)
Best!
from redwood.
after disabling it, tests run smoothly so far
Glad to hear. Do reopen if see any other issues.
from redwood.
Unfortunately still happening :/
I cannot reopen it.
Argh... somehow the extension enabled itself again...
Had to disable and restart vscode. lets see...
from redwood.
Related Issues (20)
- [Bug?]: yarn rw setup server-file fails with js but works with ts HOT 5
- Multiple RW apps all use the same debug port HOT 2
- Syntax check `package.json` for dual ESM+CJS support in `@redwoodjs/auth`
- [Bug?]: cannot set bodyLimit using server.ts HOT 2
- [Bug?]: Clarify impact on database file location with prisma multi file schema HOT 2
- [Bug]: Flaky dbAuth test in framework tests
- [RWUploads] Spike prisma extensions and if its possible to detect a specific model
- [RWUploads] Spike Prisma single table inheritance
- Background Jobs: Re-work to procedural design
- [Bug?]: Generate page command not working HOT 4
- [Bug?]: Fastify server throws an error when using custom server.ts and enriched graphql yoga server HOT 6
- [Bug]: Server doesn't handle periods in path parameters HOT 1
- [Bug?]: Storybook won't work with Mantine HOT 2
- [Bug?]: Realtime context typescript error, no redis keys created HOT 4
- Add Documentation for Alias paths within Jest HOT 1
- Add Documentation for Working with Playwright
- Add Documentation for Working with ShadCN
- Fix code samples in caching doc
- More background job tests
- Upgrade Spoke to latest v8.RC, add background jobs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from redwood.