Jest: `jest --changedSince=blablabla` crashes

Created on 22 Sep 2018  路  7Comments  路  Source: facebook/jest

馃悰 Bug Report

Running jest --changedSince=blablabla (as long as blablabla is _not_ a branch/tag/commit (anything that's not a valid reference)) crashes with an unhandled rejection.

To Reproduce

Steps to reproduce the behavior:
jest --changedSince=some-bad-revision

Expected behavior

A clean error saying that the reference was impossible to resolve, or something. Probably just show the error from git is best

Link to repl or repo (highly encouraged)

N/A, can be reproduced in any repo with VCS (including the jest repo itself).

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
Bug Help Wanted good first issue

All 7 comments

Is it ok if I try my hands on this?

@Keraito go for it!

@Keraito are you still working on this? Mind if I take a look?

For whoever is picking this issue up, Id recommend handling both scenarios where a user uses git and when a user uses mercurial.

Sorry @SimenB @rogeliog, suddenly couldn't quite find the time to work on this, so @khuyn003 go ahead.

When running command npm test -- --changedSince refs/heads/develop I got

(node:29084) UnhandledPromiseRejectionWarning: 128: fatal: bad revision '^refs/heads/develop'

Is the string refs/heads/develop invalid branch reference?

Please open up a separate issue with reproduction steps

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jardakotesovec picture jardakotesovec  路  3Comments

samzhang111 picture samzhang111  路  3Comments

hramos picture hramos  路  3Comments

paularmstrong picture paularmstrong  路  3Comments

gustavjf picture gustavjf  路  3Comments