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

Cypress tests breaks husky and pre-commit: TypeError: dest.end is not a function #3863

Closed
papb opened this issue Apr 2, 2019 · 5 comments
Closed

Comments

@papb
Copy link

papb commented Apr 2, 2019

I have tests written in cypress. Calling npm test works perfectly. But then I defined a pre-commit hook with husky and it runs the tests but breaks in the end with TypeError: dest.end is not a function.

At first I thought this was a problem with husky, not cypress, especially because running npm test directly works perfectly. So I opened an issue on husky about it, one month ago. But apparently this problem also occurs with a different git hooking library (namely pre-commit) as well.

This made me think that the problem might actually be in cypress, so I decided to open this issue. One of my guesses is that since cypress does a lot of magic, including calling other executables, maybe it somehow messed up the "completion" of the script in a way that works for direct npm test but doesn't work when another library is trying to do something with the script output, error code or something like that.

Please take a look at the linked issue on husky for the full details, including the fully reproducible steps.

@bahmutov
Copy link
Contributor

bahmutov commented Apr 2, 2019

interesting (and unexpected). Can you execute the commit hook with DEBUG=cypress* environment variable to see the debug logs?

@jennifer-shehane jennifer-shehane changed the title Cypress tests breaks husky and pre-commit Cypress tests breaks husky and pre-commit: TypeError: dest.end is not a function Apr 24, 2019
@natkrish
Copy link

@jennifer-shehane It would be great to get an idea on when this issue will be fixed. I am facing similar issues at the moment when using gitlab CI
image

@papb
Copy link
Author

papb commented Oct 23, 2019

This was apparently fixed today with the 3.5.0 release of cypress!

@papb papb closed this as completed Oct 23, 2019
@cypress-io cypress-io locked as resolved and limited conversation to collaborators Dec 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@bahmutov @natkrish @papb and others