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?]: graphiql authImpersonation breaking on windows HOT 3
- [Bug?]: Flight control deployment not working HOT 2
- [Bug?]: yarn scaffold script shows 404 when fetching packages HOT 9
- [Bug]: CLI commands fail due to unawaited promise (JS projects)
- [Bug?]: baremetal production HOT 5
- [Bug?]: MockGraphQLQuery not working when original query uses fragments HOT 10
- [Bug] Doubled up title when no explicit <title> set
- [Docs]: Outdated / incomplete doc regarding async directive testing HOT 3
- [Bug?]: Upgrading Redwood to Canary causes "unmountComponentAtNode is not a function" in Storybook
- [Bug?]: When using Trusted Documents and Auth, the Current User query is not permitted preventing authentication to work properly
- [Bug?]: `yarn rw dev` doesn't work because of fsevents dep HOT 4
- chore(deps): update dependency @supabase/supabase-js to v2.43.5
- [Bug?]: Can't configure Jest/Vitest to run tests inside of scripts dir
- [Bug?]: `web/src/auto-imports.d.ts` file generated after running `yarn rw storybook-vite` HOT 4
- [Bug?]: Pre-render does not work HOT 7
- [Bug]: Docs search is broken HOT 3
- [Bug?]: yarn rw upgrade for 7.7.1 error HOT 3
- [Bug]: Scenario files in a __tests__ directory throws error in Jest
- [Bug?]: Docker compose errors with graphql fragments HOT 8
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.