Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Issues
  • #2043
Closed
Open
Issue created Apr 28, 2017 by Administrator@rootContributor

Tests fail when $HOME is the same as the app directory when using yarn

Created by: jmorrell

Can you reproduce the problem with latest npm?

No, it is specific to the way yarn sets up its cache directory.

Description

In an environment where $HOME is also the application directory, yarn ends up creating its cache directory within the application directory. This is the case in Heroku's CI environment:

~ $ yarn cache dir
/app/.cache/yarn/v1
~ $ echo $HOME
/app
~ $ pwd
/app

Expected behavior

The default jest config should probably ignore tests found within .cache

Actual behavior

Any *.test.js files in the yarn cache end up getting executed with running yarn test, causing the tests to fail.

Environment

Run these commands in the project folder and fill in their results:

  1. npm ls react-scripts (if you haven’t ejected):
~ $ yarn list react-scripts
yarn list v0.22.0
└─ react-scripts@0.9.5
  1. node -v:
~ $ node -v
v6.10.2
  1. npm -v:
~ $ yarn --version
0.22.0

Then, specify:

  1. Operating system:
~ $ uname -a
Linux fdedd5aa-0bd6-4529-b6bb-e6aef7830852 3.13.0-112-generic #159-Ubuntu SMP Fri Mar 3 15:26:07 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
  1. Browser and version:

N/A

Assignee
Assign to
Time tracking