Skip to content

Jest can't resolve routes correctly#37

Merged
ericclemmons merged 1 commit into
masterfrom
37-jest
Mar 16, 2019
Merged

Jest can't resolve routes correctly#37
ericclemmons merged 1 commit into
masterfrom
37-jest

Conversation

@ericclemmons
Copy link
Copy Markdown
Owner

This is incredibly hard to troubleshoot, but it goes something like this:

  1. project/node_modules/polydev/src/middleware/router/handle.production.js attempts to require("project/example/routes/login/index.ts")
  2. Jest does a bunch of resolution stuff, and ends up loading project/index.js.
  3. Just incorrectly stores the module key as user:project/node_modules/polydev/src/middleware/router/handle.production.js:, because it can't resolve the absolute path or mock module location/meta.

@ericclemmons
Copy link
Copy Markdown
Owner Author

@ericclemmons ericclemmons merged commit 3c2e995 into master Mar 16, 2019
@ericclemmons
Copy link
Copy Markdown
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant