question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Standard /web Tests Fail

See original GitHub issue

Hey! First of all, great job with Redwood. This definitely has tons of potential and I’d love to help out in any way I could.

In messing with #256, I just couldn’t seem to get the /web tests to pass with the app built from the tutorial. I would get:

FAIL  src/pages/ContactPage/ContactPage.test.js
  ● Test suite failed to run

    Cannot find module '@redwoodjs/web' from 'ContactPage.js'

    However, Jest was able to find:
        './ContactPage.js'
        './ContactPage.test.js'

    You might want to include a file extension in your import, or update your 'moduleFileExtensions', which is currently
 ['js', 'json', 'jsx', 'ts', 'tsx', 'node'].

    See https://jestjs.io/docs/en/configuration#modulefileextensions-array-string

    > 1 | import {
        | ^
      2 |   FieldError,
      3 |   Form,
      4 |   Label,

      at Resolver.resolveModule (../node_modules/jest-resolve/build/index.js:276:11)
      at Object.<anonymous> (src/pages/ContactPage/ContactPage.js:1:1)

for just about every test.

Here are some steps to reproduce:

  1. git clone https://github.com/AryanJ-NYC/redwoodjsblogexample
  2. yarn install && yarn rw db generate && yarn rw test web
  3. Watch the tests fail. 😢

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
peterpcommented, Mar 23, 2020

Ah yeah. We need to change the way routes works. I’ll bring this up in tomorrow’s meeting.

0reactions
thedavidpricecommented, Jun 1, 2020

Foundationally fixed by #521

We’ll need to re-audit and adjust templates, which is starting to happen for Cells here #629

Read more comments on GitHub >

github_iconTop Results From Across the Web

What To Do When Tests Fail? - TestProject
Tests usually fail due to server and network issues, an unresponsive application or validation failure, or scripting issues. When failures occur ...
Read more >
Why did my availability test fail while my website is still ...
If a step fails, then it will appear at the top of the availability result to give you instant insight into where the...
Read more >
Why did my test fail? - Testim overview
A defect was identified in the tested application and the test did not return the expected results. There was a flaw in the...
Read more >
22 Reasons Why Test Automation Fails For Your Web App
We are listing 22 reasons why test automation fails for a web application to help you rectify your web automated testing process.
Read more >
Web Tests (formerly known as Layout Tests or LayoutTests)
Tracking Test Failures; Debugging Web Tests ... Tests marked as [ Skip ] in TestExpectations won't be run by default, generally because they...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found