Running yarn rw test should automatically generate jest.config.js files for api and web if they're missing
See original GitHub issueEDIT: The original issue is solved by adding jest.config.js files. So, running yarn rw test should automatically generate jest.config.js files for api and web if they’re missing.
Original issue: Tests [web] are failing to run because __REDWOOD__API_PROXY_PATH is not defined
yarn rw test web
Test suite failed to run
ReferenceError: __REDWOOD__API_PROXY_PATH is not defined
> 1 | import { render } from '@redwoodjs/testing'
| ^
2 |
3 | import { Header } from './Header'
4 |
at Object.<anonymous> (../node_modules/@redwoodjs/web/dist/config.js:5:36)
at Object.<anonymous> (../node_modules/@redwoodjs/web/dist/index.js:68:1)
at Object.<anonymous> (../node_modules/@redwoodjs/testing/dist/MockProviders.js:15:12)
at Object.<anonymous> (../node_modules/@redwoodjs/testing/dist/customRender.js:17:22)
at Object.<anonymous> (../node_modules/@redwoodjs/testing/dist/index.js:78:21)
at Object.<anonymous> (src/components/Header/Header.test.js:1:1)
`
```bash
yarn rw info
yarn run v1.22.4
$ /Users/terriskremer/Sites/kremer/kremerlibrary/node_modules/.bin/rw info
System:
OS: macOS Mojave 10.14.6
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 12.18.1 - /var/folders/s3/jyccmmxs11j893bfb92tt0900000gn/T/yarn--1596039261212-0.9150607551937429/node
Yarn: 1.22.4 - /var/folders/s3/jyccmmxs11j893bfb92tt0900000gn/T/yarn--1596039261212-0.9150607551937429/yarn
Databases:
SQLite: 3.24.0 - /usr/bin/sqlite3
Browsers:
Chrome: 84.0.4147.105
Firefox: 74.0
Safari: 13.1.2
npmPackages:
@redwoodjs/core: ^0.14.0 => 0.14.0
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Configuring Jest
It is recommended to define the configuration in a dedicated JavaScript, TypeScript or JSON file. The file will be discovered automatically, if ......
Read more >Testing in Redwood - RedwoodJS Community
Mirage JS is an API mocking library that lets you build, test and share a complete working JavaScript application without having to rely...
Read more >create-t3-app vs. RedwoodJS: Comparing full-stack React ...
Compare Create-T3-App, a CLI for full-stack Next.js projects, ... you would first need to run yarn rw setup ui tailwind and then use...
Read more >@sa11y/jest - npm
You can set up the sa11y API once at the project level to make it ... Add a Jest setup file (e.g. jest-setup.js...
Read more >WebStorm 223.7571.168 Release Notes | Knowledge Base
Task, WEB-56601, Enable auto-import for js files for symbols from ... Bug, WEB-55864, When debug jest test, timeout setting is still enabled.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@peterp That was it. Many thanks. I’ve updated the issue.
Hey @Terris, thanks for opening this issue, I’m pretty sure this should be fixed in the latest canary - and we’re going to release 0.15.0 very soon.