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

Message when using changedSince is wrong #7026

Closed
SimenB opened this issue Sep 22, 2018 · 4 comments
Closed

Message when using changedSince is wrong #7026

SimenB opened this issue Sep 22, 2018 · 4 comments

Comments

@SimenB
Copy link
Member

SimenB commented Sep 22, 2018

🐛 Bug Report

When using changedSince, the message is No tests found related to files changed since last commit.

To Reproduce

Jest repo: yarn jest --changedFiles=master

Expected behavior

The message should say e.g. since *commit/branch*

Link to repl or repo (highly encouraged)

N/A

Run npx envinfo --preset jest

Paste the results here:

Environment:
  OS: macOS High Sierra 10.13.6
  Node: 8.11.1
  Yarn: 1.9.4
  npm: 6.4.1
  Watchman: 4.9.0
  Xcode: Xcode 9.1 Build version 9B55
  Android Studio: EAP AI-145.3111935 AI-145.3111935
@natealcedo
Copy link

natealcedo commented Sep 23, 2018

I'd just like to point out that the To Reproduce section should be yarn jest --changedSince=master instead of yarn jest --changedFiles=master.

Edit: Actually, this looks fairly simple enough. Let me take a look into this.

@rogeliog
Copy link
Contributor

The message should say e.g. since commit/branch

Should we also include tag? Also, given that it can be any Git ref it would be awesome if we are able to figure out if the ref is a commit/branch/tag and then show the appropriate message based on that.

@natealcedo
Copy link

@rogeliog Would that be out of the scope of this issue? I was under the assumption that this issue was just handling the case where no tests are found from the ref given and just return a message like this since master or since ${sha1}.

Seems like there's an overlap with issue #7025. Given your proposal one would now need to parse the ref, shell out to check if it exists in tags, commits, and branches. If it doesn't exist, it will throw an error. Which is what #7025 is handling.

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants