teambit / envs

Component development environments for the Bit community
https://bit.dev/bit/envs
Other
64 stars 9 forks source link

Test file for react component not found but exists (jest) #152

Open trycrmr opened 4 years ago

trycrmr commented 4 years ago

Describe the bug

Test files associated with components are not found even though they exist.

Steps to Reproduce

  1. bit import trycrmr.blog/post-title-section
  2. bit test trycrmr.blog/post-title-section
  3. Review jest error output.

Expected Behavior

terrycreamer in blog: bit test trycrmr.blog/post-title-section -v
✔ building component - trycrmr.blog/post-title-section@0.0.2

trycrmr.blog/post-title-section@0.0.2
tests failed
file: PostTitleSection/PostTitleSection.test.js

✖ Jest failure 
    Command failed: "/home/terrycreamer/.nvm/versions/node/v14.7.0/bin/node" /home/terrycreamer/dev/github-trycrmr/personal-site-with-wordpress-and-gatsby/src/components/blog/.bit/components/testers/jest/bit.envs/22.4.3/node_modules/jest/bin/jest.js dist/PostTitleSection/PostTitleSection.test.js --rootDir=dist/PostTitleSection --config=/home/terrycreamer/dev/github-trycrmr/personal-site-with-wordpress-and-gatsby/src/components/blog/.bit/components/testers/jest/bit.envs/22.4.3/dist/jest.config.js --json --outputFile="PostTitleSection-results.json"
No tests found
No files found in dist/PostTitleSection.
Make sure Jest's configuration does not exclude this directory.
To set up Jest, make sure a package.json file exists.
Jest Documentation: facebook.github.io/jest/docs/configuration.html
Pattern: dist/PostTitleSection/PostTitleSection.test.js - 0 matches
 `"/home/terrycreamer/.nvm/versions/node/v14.7.0/bin/node" /home/terrycreamer/dev/github-trycrmr/personal-site-with-wordpress-and-gatsby/src/components/blog/.bit/components/testers/jest/bit.envs/22.4.3/node_modules/jest/bin/jest.js dist/PostTitleSection/PostTitleSection.test.js --rootDir=dist/PostTitleSection --config=/home/terrycreamer/dev/github-trycrmr/personal-site-with-wordpress-and-gatsby/src/components/blog/.bit/components/testers/jest/bit.envs/22.4.3/dist/jest.config.js --json --outputFile="PostTitleSection-results.json"` (exited with error code 1)
    undefined

Screenshots, exceptions and logs

image

Specifications

{
  "env": {
    "compiler": {
      "bit.envs/compilers/react@1.0.20": {}
    },
    "tester": {
      "bit.envs/testers/jest@22.4.3": {
        "rawConfig": {
          "jest-config": {}
        }
      }
    }
  },
  "componentsDefaultDirectory": "components",
  "packageManager": "yarn",
  "dist": {
    "target": "dist"
  }
}

Additional context

Test should be found, but fail. Test is not found at all.

Related issues (I'm presuming): #123 #146