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

TypeError: Cannot read property 'length' of undefined #340

Closed
binarykitchen opened this issue Apr 28, 2015 · 13 comments
Closed

TypeError: Cannot read property 'length' of undefined #340

binarykitchen opened this issue Apr 28, 2015 · 13 comments

Comments

@binarykitchen
Copy link

Since I switched to io.js v1.8.1 I get plenty of these errors:

TypeError: Cannot read property 'length' of undefined
  at maybeReadMore_ (_stream_readable.js:425:18)
  at /home/xxx/node_modules/gulp-jest/node_modules/jest-cli/src/lib/FakeTimers.js:325:7
  at process._tickCallback (node.js:341:15)
@sogko
Copy link

sogko commented Apr 29, 2015

+1

This error manifests itself if a __tests__ folder has more than one test file in it.

It works as expected if there is only one test file in the __test__ folder.

io.js v1.8.1 as well with babel preprocessor
jest v0.4.0

Edit:
seems like jest doesn't play nice with io.js yet (re: #243)

@seanchen1991
Copy link

@sogko I receive this error even when I have only one test per tests folder, though I have multiple tests folders throughout my project.

@nkashyap
Copy link

+1 same issue for me
io.js v 2.0.1
jest v0.4.3

@lfilho
Copy link

lfilho commented May 29, 2015

+1

iojs 1.8.1
jest 0.4.5

@lfilho
Copy link

lfilho commented May 29, 2015

Also happend on

iojs 2.1.0
jest 0.4.5

@geirsagberg
Copy link

+1

iojs 2.3.1
jest-cli 0.4.13

@mattotodd
Copy link

If you would like to use jest with io.js, you will need to use the 0.5.x branch of the jest-cli

npm install facebook/jest#0.5.x

found via #243 (comment)
and fixed the issue for me

@lfilho
Copy link

lfilho commented Jul 10, 2015

thanks, @mattotodd ! I've given up on Jest for the project I'm working on, but I'll keep that in mind for next time I try Jest.

Thanks for taking the time to post this here!

@binarykitchen
Copy link
Author

https://github.com/binarykitchen/gulp-jest-iojs might be useful ...

@bhanubhakta
Copy link

@mattotodd npm WARN package.json @ No repository field while using npm install facebook/jest#0.5.x

@kreigne
Copy link

kreigne commented Aug 10, 2015

+1

@cpojer
Copy link
Member

cpojer commented Oct 21, 2015

This is fixed in 0.5.

@cpojer cpojer closed this as completed Oct 21, 2015
joshball added a commit to joshball/flux that referenced this issue Jan 19, 2016
Other examples do not fail, but upgrade any way.
I did not upgrade the main flux package.json, as the tests do not currently pass.
@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 14, 2021
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

11 participants