dimanche 10 février 2019

jest having trouble loading some of my components and j-frog artifactories

i have a test suite in an already existing project that uses components and j-frog artifactories. I tried to create a sample test for a component and run it but i am getting the following error that says a module cannot be found but it could find other modules that i gave it the path to. my dev dependencies folder has the following:

Here is the sample test case i used

Here is the package structure, the package.json is in the src folder and im running my tests from the PagesTest folder by running the command npm test

the following is inside my package.lock file

“jest”: {
     “moduleDirectories”: [
       “node_modules”,
       “src”
     ],
     “modulePaths”: [
       “node_modules”,
       “<rootDir>”
     ]
   }

Can anyone help me diagnose this error? I just want to see if the will render tests will pass so i can write more complex tests.

thanks in advance for any help!

Aucun commentaire:

Enregistrer un commentaire