Giter Club home page Giter Club logo

Comments (5)

dennemark avatar dennemark commented on July 4, 2024 1

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.

dthyresson avatar dthyresson commented on July 4, 2024

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.

dennemark avatar dennemark commented on July 4, 2024

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.

dthyresson avatar dthyresson commented on July 4, 2024

after disabling it, tests run smoothly so far

Glad to hear. Do reopen if see any other issues.

from redwood.

dennemark avatar dennemark commented on July 4, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.