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

[M2#A08] - Erro no watch do jest no Git Bash #176

Closed
hiwoshu opened this issue Aug 22, 2018 · 5 comments
Closed

[M2#A08] - Erro no watch do jest no Git Bash #176

hiwoshu opened this issue Aug 22, 2018 · 5 comments
Labels

Comments

@hiwoshu
Copy link

hiwoshu commented Aug 22, 2018

E aí, @fdaciuk, blz? O watch não roda pra mim, dá erro, funciona apenas o watchAll, estou usando o Git Bash como terminal e quando tento rodar o npm run test:watch aparece:

--watch is not supported without git/hg, please use --watchAll
npm ERR! Test failed. See above for more details.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ test:watch: npm test -- --watch npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the @ test:watch script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.`

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\...\AppData\Roaming\npm-cache\_logs\2018-08-22T18_09_23_216Z-debug.log

Quando uso watchAll funciona, mas sem as opções q vc mostrou no video:

`Watch Usage

Press o to only run tests related to changed files.
Press p to filter by a filename regex pattern.
Press q to quit watch mode.
Press Enter to trigger a test run.`

Seria problema do Git Bash, ou da versão das dependências?

@fdaciuk

@fdaciuk
Copy link
Member

fdaciuk commented Aug 23, 2018

Oi @hiwoshu! Consegue subir seu projeto aqui no GitHub pra eu dar uma olhada? Aí passa o link aqui que eu já te digo qual pode ser o problema =)

@hhendrikk
Copy link

Já tive o mesmo problema...
O jest --watch precisa do git ou mercurial para funcionar.
Executa git init no diretório do seu projeto que a opção --watch deve funcionar.

jestjs/jest#5725

@fdaciuk
Copy link
Member

fdaciuk commented Aug 23, 2018

Boa @0v3lh4! =)
@hiwoshu testa ae e diz pra gente se funciona assim =)

@hiwoshu
Copy link
Author

hiwoshu commented Aug 24, 2018

Então, não funciona. Parece q tem q ser um repositório clonado, ou um branch, pra funcionar.

Tentei com o git init, e apareceu um monte de erro.

O q deu certo foi trocar o terminal, testei em outros terminais e deu tudo certo, mas com watchAll, e só no Git Bash q não aparecem as opções. Mas já estou usando outro terminal e agora tá tudo certo.

Obg. @0v3lh4, @fdaciuk

@hiwoshu hiwoshu closed this as completed Aug 24, 2018
@fdaciuk
Copy link
Member

fdaciuk commented Aug 27, 2018

Perfeito @hiwoshu =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants