redwood: Test suite failed to run

Running the line yarn rw prisma migrate dev (see Tutorial Migrations) on the most current version of RedwoodJS (0.25.1) on Windows, I got

image

The same error appears for AboutPage, HomePage, BlogLayout

`  ● Test suite failed to run

    Cannot find module '~__REDWOOD__USER_ROUTES_FOR_MOCK' from 'node_modules/@redwoodjs/testing/dist/MockProviders.js'

    Require stack:
      node_modules/@redwoodjs/testing/dist/MockProviders.js
      node_modules/@redwoodjs/testing/dist/customRender.js
      node_modules/@redwoodjs/testing/dist/index.js
      web/src/layouts/BlogLayout/BlogLayout.test.js

      at Resolver.resolveModule (node_modules/jest-resolve/build/index.js:306:11)
      at Object.<anonymous> (node_modules/@redwoodjs/testing/dist/MockProviders.js:32:5)

In addition, I also get

'scenario' is defined but never used. Allowed unused args must match /^_/u.

Windows 10, node v12.19.0, yarn 1.22.5, RedwoodJS 0.25.1

Sorry for not feeling up to debug this and provide PR (very weak on testing 😢 )

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (24 by maintainers)

Most upvoted comments

Conclusion of my investigation

It is safe to ignore this whole thread.

I did run the actions that are presented there using the current Redwood and VSCode Version: 1.63.2 Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3 Date: 2021-12-15T09:37:28.172Z (4 days ago).

The problems indicated on the initial image on that report are caused by VSCode intent to run multiple tasks in parallel - so it tried to run at least a portion of the testing structure (note four test pages shown on that image).

Either the testing setups at the time of my running the tutorial 2 were incomplete, or VSCode got less ambitious with running parallel tasks - the tutorial sample up to and include this section behaves correctly

Great workflow @thedavidprice. While I would be less formal in my “native” mode, I really like your introduction into Redwood culture and expected communications. I particularly like two sentences:

One individual I’d suggest you watch and ask for advice is @dthyresson He’s done a great, patient, sustained job working from RFC to Forum Post to Draft PR to escalating to Core Team several times now (and on repeat)

@dthyresson would be my choice had you not proposed him, so let’s hope that he would not mind being my RW communications protocol adviser

@adriatic I’m trying to clean up some of the long-standing issues in the repo. There’s been several updates to scenarios, testing, and mocks since this issue was opened in February, so I feel like this has been addressed. But please do feel free to re-open this if you feel like it’s still a problem and we’ll prioritize sorting it out before v1.

@adriatic Thank you for this question. Visibility and feedback are important (and hard) as this project picks up speed and there’s continual incoming. One individual I’d suggest you watch and ask for advice is @dthyresson He’s done a great, patient, sustained job working from RFC to Forum Post to Draft PR to escalating to Core Team several times now (and on repeat).

If you want to experiment and iterate, here are some patterns you can try (if not try all):

  1. Start with an RFC Issue: in brief, outline the problem and proposed solution. Also outline the questions you have and areas where you need some help. Don’t expect comments or replies. Just keep moving!
  2. Next, create a Draft PR. This community responds very well to working examples. And a draft PR branch can be “checked-out” and iterated on by others. Think of it as a way to collaboratively sketch. The point isn’t necessarily getting it merged as much as it is communicating and iterating.
  3. Then create a simple Forum post with a request for help. Ask people in the community to help out by testing the PR code (link back to the PR). Also ok to post the link in Discourse

Each step of the way, here are some tips:

  • Titles matter: keep them specific and focused on keyword. If there’s an “action” involved, like “Help wanted”, include that as well
  • Target an audience: you might need to say “I’m looking for Windows devs using VS Code”. Or, “requesting help from people who are using VS Code debugging”.
  • Leave a breadcrumb – link between the posts across platforms to create connections people can follow
  • Know your context: GitHub needs to be more Problem/Solution precise, The Forum is better for long-form, etc.
  • Nudge people: give it some time, but do nudge a person or two who would be “lead” on the topic. The best way to nudge is via a PR

Any other thoughts, @dthyresson?

I respectfully disagree Tim (@tctrautman), because my original issue report describes the failure taking place in the context of running a tutorial setting the first migration (yarn rw prisma migrate dev) up, and that used to work before last redwood update