Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Issue in running grover on windows #21

Open
gurumvg opened this issue Aug 28, 2013 · 8 comments
Open

Issue in running grover on windows #21

gurumvg opened this issue Aug 28, 2013 · 8 comments

Comments

@gurumvg
Copy link

gurumvg commented Aug 28, 2013

When I try to run grover on my module, it throws below error.

C:\workspace\demo\branches\feature-branch\src>grover ./my-widget/tests/unit/my-widget.html
Starting Grover on 1 files with [email protected]
  Running 15 concurrent tests at a time.

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:977:11)
    at Process.ChildProcess._handle.onexit (child_process.js:768:34)

Appreciate any inputs to get this resolved.

@gurumvg
Copy link
Author

gurumvg commented Sep 12, 2013

Tried to launch 'grover' through yogi but still didn't work. Below are the console error messages. @davglass, would be great if you can help me out with this issue and also point me to a resource who is supporting yui tools now.

yogi [debug] yuidoc: 'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
yogi [ERROR] selleck: 'C:\Program' is not recognized as an internal or external command,
operable program or batch file.


C:\Program Files\nodejs\node_modules\yogi\node_modules\istanbul\lib\report\html.js:156
        structuredText[lineNumber].covered = count > 0 ? 'yes' : 'no';
                                                                 ^
TypeError: Cannot set property 'covered' of undefined
    at C:\Program Files\nodejs\node_modules\yogi\node_modules\istanbul\lib\report\html.js:156:66
    at Array.forEach (native)
    at annotateLines (C:\Program Files\nodejs\node_modules\yogi\node_modules\istanbul\lib\report\html.js:154:28)
    at HtmlReport.Report.mix.writeDetailPage (C:\Program Files\nodejs\node_modules\yogi\node_modules\istanbul\lib\report\html.js:370:9)
    at C:\Program Files\nodejs\node_modules\yogi\node_modules\istanbul\lib\report\html.js:435:26
    at SyncFileWriter.extend.writeFile (C:\Program Files\nodejs\node_modules\yogi\node_modules\istanbul\lib\util\file-writer.js:57:9)
    at FileWriter.extend.writeFile (C:\Program Files\nodejs\node_modules\yogi\node_modules\istanbul\lib\util\file-writer.js:124:23)
    at C:\Program Files\nodejs\node_modules\yogi\node_modules\istanbul\lib\report\html.js:434:24
    at Array.forEach (native)
    at HtmlReport.Report.mix.writeFiles (C:\Program Files\nodejs\node_modules\yogi\node_modules\istanbul\lib\report\html.js:428:23)

@derek
Copy link

derek commented Sep 18, 2013

Can you please post the contents of my-widget.html so I can try to reproduce this issue?

@derek
Copy link

derek commented Sep 18, 2013

As for the 2nd issue, it looks like you don't' have yuidoc or selleck installed. While those should be installed as dependencies (assuming you ran npm install -g yogi), it's worth trying to install them manually, npm install -g yuidocjs selleck. After that, ensure both are installed correctly via yuidoc -v and selleck -v. If installed and Yogi still doesn't work, then there might be an issue in of Yogi.

@gurumvg
Copy link
Author

gurumvg commented Sep 19, 2013

Thanks @derek for looking into this. For some reasons, I can't share you the my-widget.html code.

I have tried to update phantomjs.exe and now i get a different issue when I ran `grover'.

    Javascript Error
       ReferenceError: Can't find variable: YUI

Did you come across above issue ? Below are my selleck & yuidoc versions installed on my machine. Looks like the issue is nothing to do with them.

Selleck 0.1.18
yuidoc 0.3.44

@sgilligan
Copy link

I think I might be seeing the same problem.

I suspect your test uses relative paths to refer to the YUI seed file (as mine does). If you run grover directly on the test, it resolves the relative path with the file system happily. But yogi looks like it runs grover within the context of its server which imposes a root reference that your relative path can't step outside of. So the grover test fails as it can't resolve the reference to the YUI seed file.

@sgilligan
Copy link

Just looking at this - https://github.com/yui/yui3-gallery/blob/master/src/gallery-datasource-async-function/tests/unit/test.html

I see - <script src="/build/yui/yui-min.js"></script>

Does this mean these unit tests are not runnable from the file system (ie double click the test and away she goes). Is that the model - that these then need to be always run from yogi?

@timothyerwin
Copy link

I think I am having a similar issue. Any ideas?

$ grover index.html
Starting Grover on 1 files with [email protected]
  Running 15 concurrent tests at a time.
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: spawn phantomjs ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickCallback (node.js:355:11)

@gurumvg
Copy link
Author

gurumvg commented May 18, 2015

I'm running into the same issue when trying to setup grover on a new machine. appreciate any inputs if anyone got to fix it.

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