Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project from react-native init no longer includes __tests__ directory #19761

Closed
3 tasks done
ashfurrow opened this issue Jun 16, 2018 · 6 comments
Closed
3 tasks done
Labels
Impact: Regression Describes a behavior that used to work on a prior release, but stopped working recently. Resolution: Locked This issue was locked by the bot. 🔩Test Infrastructure Test infrastructure and continuous integration.

Comments

@ashfurrow
Copy link

Environment

This is not applicable to my issue because the bug I'm reporting is around react-native init, but here's what info I get from running the command within the generated folder:

➜  bin > react-native --version
react-native-cli: 2.0.1
react-native: n/a - not inside a React Native project directory
➜  bin > cd MyAwesomeProject
➜  MyAwesomeProject > react-native info
Scanning folders for symlinks in /Users/ashfurrow/bin/MyAwesomeProject/node_modules (44ms)

Environment:
  OS: macOS High Sierra 10.13.5
  Node: 8.4.0
  Yarn: 1.6.0
  npm: 5.3.0
  Watchman: 4.9.0
  Xcode: Xcode 9.4.1 Build version 9F2000
  Android Studio: Not Found

Packages: (wanted => installed)
  react: 16.3.1 => 16.3.1
  react-native: 0.55.4 => 0.55.4

I see this isn't using the latest React Native version, but it is using the latest react-native-cli version.

Description

The project generated by running react-native init no longer includes a __tests__ directory. At some point, it did but I can't find where in the changelog that it was removed.

The init command appears to pull in the template from this directory of the repo, which includes a __tests__ directory, but I took a look around and I'm not sure what the problem is. I'm happy to help provide more details or dive into debugging this with some guidance. Thanks!

Reproducible Demo

In a terminal, run react-native init TestApp and then cd into the TestApp directory.

Expected results: there is a __tests__ directory with a basic test for App.js.

Actual results: there is no __tests__ directory.

@ashfurrow ashfurrow changed the title Project from react-native init no longer includes __test__ directory Project from react-native init no longer includes __tests__ directory Jun 16, 2018
@hramos
Copy link
Contributor

hramos commented Jun 16, 2018

Thanks for reporting this!

@hramos hramos added 💻CLI 🔩Test Infrastructure Test infrastructure and continuous integration. Impact: Regression Describes a behavior that used to work on a prior release, but stopped working recently. labels Jun 16, 2018
@stale
Copy link

stale bot commented Oct 31, 2018

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 31, 2018
@ashfurrow
Copy link
Author

I just went through the reproduction steps outlined in my bug report and it appears to still be missing the directory.

➜  temp react-native --version
react-native-cli: 2.0.1
react-native: n/a - not inside a React Native project directory
➜  temp react-native init TestApp
[truncated]
➜  temp cd TestApp
➜  TestApp react-native info

  React Native Environment Info:
    System:
      OS: macOS High Sierra 10.13.6
      CPU: x64 Intel(R) Xeon(R) CPU E5-1620 v2 @ 3.70GHz
      Memory: 3.21 GB / 32.00 GB
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
      Yarn: 1.10.1 - ~/.nvm/versions/node/v8.12.0/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm
      Watchman: 4.7.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.0, macOS 10.14, tvOS 12.0, watchOS 5.0
    IDEs:
      Xcode: 10.0/10A255 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.0-alpha.8af6728 => 16.6.0-alpha.8af6728
      react-native: 0.57.4 => 0.57.4
    npmGlobalPackages:
      react-native-cli: 2.0.1

Updated React/Native versions but still no __tests__ directory.

@stale stale bot removed the Stale There has been a lack of activity on this issue and it may be closed soon. label Oct 31, 2018
@hramos
Copy link
Contributor

hramos commented Jan 14, 2019

The CLI was extracted from this repository, but the template still lives in this repo at https://github.com/facebook/react-native/tree/master/template. It's still the same template from when Ash first opened this issue, and the __tests__ directory is still there.

The command line tools have their own repository and issue tracker over at https://github.com/react-native-community/react-native-cli, do you think you can cross-post over there since the issue is likely in the CLI code itself?

@ashfurrow
Copy link
Author

No problem. @hramos does this look sufficient? react-native-community/cli#88 Should we close this issue, then?

@hramos
Copy link
Contributor

hramos commented Jan 15, 2019

Thanks for migrating the issue, let me close this one.

@hramos hramos closed this as completed Jan 15, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Jan 15, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jan 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Impact: Regression Describes a behavior that used to work on a prior release, but stopped working recently. Resolution: Locked This issue was locked by the bot. 🔩Test Infrastructure Test infrastructure and continuous integration.
Projects
None yet
Development

No branches or pull requests

3 participants