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

can't run tests #116

Open
hex13 opened this issue Mar 29, 2016 · 4 comments
Open

can't run tests #116

hex13 opened this issue Mar 29, 2016 · 4 comments
Labels

Comments

@hex13
Copy link
Contributor

hex13 commented Mar 29, 2016

Hello,
I cloned repo, run npm install and npm run package, the I run npm test and what happened:


    > jest

    Using Jest CLI v0.5.10
     FAIL  components/__tests__/ReplEntryStatus-test.js (2.143s)
    ReplEntryStatus
      ✕ it encountered a declaration exception

     FAIL  components/__tests__/ReplConsoleMessageFilters-test.js (2.265s)
    ReplConsoleMessageFilters
      ✕ it encountered a declaration exception

     FAIL  components/__tests__/ReplOutputFunction-test.js (2.336s)
    ReplOutputFunction
      ✕ it encountered a declaration exception

     FAIL  components/__tests__/ReplStatusBar-test.js (2.409s)
    ReplStatusBar
      ✕ it encountered a declaration exception

     FAIL  components/__tests__/ReplEntryMessage-test.js 

     FAIL  components/__tests__/ReplEntry-test.js (1.029s)
    ReplEntry
      ✕ it encountered a declaration exception

     FAIL  components/__tests__/ReplEntryOutputError-test.js (0.937s)
    ReplEntryOutputError
      ✕ it encountered a declaration exception

     FAIL  components/__tests__/ReplOutputArray-test.js (0.944s)
    ReplOutputArray
      ✕ it encountered a declaration exception

     FAIL  components/__tests__/ReplEntryIcon-test.js (0.601s)
    ReplEntryIcon
      ✕ it encountered a declaration exception

     FAIL  components/__tests__/ReplOutputObject-test.js (0.88s)
    ReplOutputObject
      ✕ it encountered a declaration exception

     FAIL  components/__tests__/ReplPrompt-test.js (0.61s)
    ReplPrompt
      ✕ it encountered a declaration exception

     FAIL  components/__tests__/ReplActiveIcon-test.js (0.581s)
    ReplActiveIcon
      ✕ it encountered a declaration exception

     FAIL  components/__tests__/ReplConsole-test.js (1.16s)
    ReplConsole
      ✕ it encountered a declaration exception

    Running 1 test...

(and it's hanging on "running 1 test")

OS X 10.9.5
Used node version v4.4.0 (npm v2.14.20) but I tried some other versions too.

I suppose that problem could be related with:
jestjs/jest#554
(although they write about npm3 but I used npm 2.14.20, like I wrote above, and it's not working)

I tried to debug via console.log when exactly is error and I learned that for example line
let ReplPrompt = require('../ReplPrompt.js');
in specs:
https://github.com/princejwesley/Mancy/blob/master/src/components/__tests__/ReplPrompt-test.js#L9
causes error:

[TypeError: /Users/lukasz/sandbox/Mancy/src/components/ReplPrompt.js: 
/Users/lukasz/sandbox/Mancy/node_modules/babel-runtime/helpers/possibleConstructorReturn.js: 
/Users/lukasz/sandbox/Mancy/node_modules/babel-runtime/helpers/typeof.js: 
/Users/lukasz/sandbox/Mancy/node_modules/babel-runtime/core-js/symbol.js: 
/Users/lukasz/sandbox/Mancy/node_modules/babel-runtime/node_modules/core-js/library/fn/symbol/index.js: /Users/lukasz/sandbox/Mancy/node_modules/babel-runtime/node_modules/core-js/library/modules/es6.symbol.js: Cannot read property 'type' of null]
@princejwesley
Copy link
Owner

@hex13 Yea. I should work on that area. It was working fine in version 1. I didn't write nor update the test cases. I'll spend time to fix and update here 😄

@hex13
Copy link
Contributor Author

hex13 commented Mar 29, 2016

So on your installation you can't also running tests?

Because I wanted to add a feature. I made a preview feature for React elements:
#117 (no tests for now).

@princejwesley
Copy link
Owner

@hex13 Yea. No issues.

@sibelius
Copy link

sibelius commented Sep 8, 2016

@princejwesley you should consider using Snapshot testing available on jest 14 - https://facebook.github.io/jest/blog/2016/07/27/jest-14.html

it makes testing very simple

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