2

I have the following folder structure:

enter image description here

Clearly React is using Jest in "Client" node_modules. If i try to install Jest for server node_modules (one lvl up), i will get error from React, saying i have duplicate packages up in the tree. How should i run tests for server with Jest? How should i install Jest for server? Or should i? Or i can use the same Jest react uses in "Client" folder? If so, how? What is the command? Really appreciate your help.

1 Answer 1

2

2 separate dependency trees, avoiding duplicate packages up in the tree would look like following:

server
  ├──> node_modules
  ├──> index.js
  └──> package.json
client
  ├──> node_modules
  ├──> index.js
  └──> package.json
.gitignore
README.md
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.