Urigo / WhatsApp-Clone-Tutorial

https://www.tortilla.academy/Urigo/WhatsApp-Clone-Tutorial
https://tortilla.academy
564 stars 144 forks source link

[Server Step 3.1] Given error when doing yarn test, lacking global-setup.ts #82

Open pjunwei95 opened 4 years ago

pjunwei95 commented 4 years ago

Lack of tests/global-setup.ts given in the tutorial, have to navigate to github to get the code

jacksonbenete commented 3 years ago

As of February 2021 a couple of things went wrong in this step.

I was getting an error about jest-unit, I had to do a npm update as suggested in a similar issue about jest-junit: WhatsApp-Clone-Client-React#issue905.

Then ironically I start getting an error about jest-junit, had to run yarn add jest-junit again.

And finally it was broken because of tests/global-setup.ts is missing. In my case I just removed "globalSetup": "<rootDir>/tests/global-setup.ts" from whatsapp-clone-server/package.json.

Although the idea of tortilla.academy is awesome, I guess it's naturally difficult to keep an up to date tutorial of anything about webdev, specially relying on package managers and so many tools... :(