Open njmurarka opened 3 years ago
try npm init in jest-unit-test folder
1 Navigate to jest-unit-test folder\ cd jest-unit-test 2 Install ts-jest npm install --save-dev jest typescript ts-jest @types/jest\
To run test cases npm test
Yes. This is what I did. I tried on Ubuntu Linux as well. Fails. Same error. It seems it is hardcoded or something, to look for something in your Mac home folder.
Sorry for confusion. I updated the index.spec.ts with ../ instead of personal directory and removed cheerio library . It should work now with npm test
npm test
FAIL ./index.spec.ts ● Test suite failed to run
Test Suites: 1 failed, 1 total Tests: 0 total Snapshots: 0 total Time: 2.198 s Ran all test suites. npm ERR! Test failed. See above for more details.