envs icon indicating copy to clipboard operation
envs copied to clipboard

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

Open trycrmr opened this issue 4 years ago • 0 comments

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/[email protected]

trycrmr.blog/[email protected]
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

  • Bit version: 14.8.8
  • Node version: v14.7.0
  • npm / yarn version: 1.21.1
  • Platform: Ubuntu 20.04.1 LTS
  • Compiler / Tester (include version): ...
{
  "env": {
    "compiler": {
      "bit.envs/compilers/[email protected]": {}
    },
    "tester": {
      "bit.envs/testers/[email protected]": {
        "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

trycrmr avatar Aug 22 '20 22:08 trycrmr