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

Fix pattern for HG changed files #8066

Merged
merged 1 commit into from Mar 7, 2019
Merged

Fix pattern for HG changed files #8066

merged 1 commit into from Mar 7, 2019

Conversation

mjesun
Copy link
Contributor

@mjesun mjesun commented Mar 6, 2019

When running in master with Mercurial, it throws due to an empty revision set. This PR fixes it, see reply in #7880 (comment).

Tested locally with the use of hg log --rev, under bookmarks, branches and public commits.

@mjesun mjesun requested review from SimenB and rubennorte March 6, 2019 17:40
@mjesun mjesun merged commit eae9654 into jestjs:master Mar 7, 2019
@mjesun mjesun deleted the hg-pattern branch March 7, 2019 12:21
rubennorte added a commit to rubennorte/jest that referenced this pull request Mar 7, 2019
rubennorte added a commit that referenced this pull request Mar 7, 2019
* Combine changelog entries for related unreleased changes

* Sort changelog lines

* Add missing changelog entry for #8066
@sunil1783
Copy link

Facing the same issue of hg test failed. I have clone jest from master branch.

To Reproduce :
git clone https://github.com/facebook/jest
cd jest
yarn install
yarn test

Result :
Summary of all failing tests
FAIL e2e/tests/jestChangedFiles.test.ts (17.225s)
â gets changed files for hg

Command failed: hg status -amnu --rev min((!public() & ::.)+.)^ /tmp/jest-changed-files-test-dir /tmp/jest-changed-files-test-dir/nested-dir /tmp/jest-changed-files-test-dir/nested-dir/second-nested-dir
abort: empty revision range

  at makeError (node_modules/execa/index.js:174:9)

FAIL e2e/tests/onlyChanged.test.ts (112.766s)
â gets changed files for hg

expect(received).toMatch(expected)

Expected pattern: /PASS __tests__(\/|\\)file2.test.js/
Received string:  "

  â Test suite failed to run

    abort: empty revision range

"

  299 |
  300 |   ({stdout, stderr} = runJest(DIR, ['-o', '--changedFilesWithAncestor']));
> 301 |   expect(stderr).toMatch(/PASS __tests__(\/|\\)file2.test.js/);
      |                  ^
  302 |   expect(stderr).toMatch(/PASS __tests__(\/|\\)file3.test.js/);
  303 | });
  304 |

[root@3e03e952ffa9 jest]# npx envinfo --preset jest

System:
OS: Linux 4.4 CentOS Linux 7 (Core)
CPU: (4) x64 Intel Xeon E312xx (Sandy Bridge)
Binaries:
Node: 8.15.1 - ~/.nvm/versions/node/v8.15.1/bin/node
Yarn: 1.15.0 - ~/.nvm/versions/node/v8.15.1/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v8.15.1/bin/npm

[root@3e03e952ffa9 jest]# hg --version
Mercurial Distributed SCM (version 2.6.2)
(see http://mercurial.selenic.com for more information)

Copyright (C) 2005-2012 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@395776cf6f3f jest]# ./node_modules/.bin/jest -v
24.7.1-dev

@github-actions
Copy link

This pull request 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 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants