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

Folder Structure #1

Open
iancrowther opened this issue Sep 5, 2012 · 2 comments
Open

Folder Structure #1

iancrowther opened this issue Sep 5, 2012 · 2 comments

Comments

@iancrowther
Copy link

Hi,

I am using this plugin as part of the h5bp/node-build-script and am having an issue running the jasmine tests from a folder call intermediate.

When the src is copied to the folder intermediate ( this is my staging area for build tasks ) the plugin is no longer able to locate the describe variable.

Testing jasmine specs via phantom
ReferenceError: Can't find variable: describe at...

Is this because paths to helper files are hard coded? im not sure, also, can the base path be configurable?

Thanks

Ian

@jsoverson
Copy link
Contributor

An error like that would be because the path to jasmine is in the node module which I'm curious as to why it wouldn't be accessible if you are still able to use that grunt task at all. Can you post your setup somewhere?

I was trying to avoid copying all test and lib files to a temporary directory but I think my reasoning for that got out of date as the task got larger. That may solve this partway.

@mebusw
Copy link

mebusw commented Nov 22, 2012

I met same problem when run it on a centOS5 linux server as CI job, with phantomJS 1.7 (I compiled it by myself)

Running "jasmine" task Testing jasmine specs via phantom ... [D] ["phantomjs","onResourceReceived","GET http://127.0.0.1:8888/test/spec/CommonTest.js"] [D] ["phantomjs","onError","ReferenceError: Can't find variable: describe",[{"file":"http://127.0.0.1:8888/test/spec/CommonTest.js","line":31,"function":""}]] ReferenceError: Can't find variable: describe ...

the specs run successfully on other machine such as WinXP etc.

I finally found that because that linux is as CI machine (Jenkins), so everytime I made a symbolic link under the project folder to point to somewhere storing the grunt-jasmine-runner module for re-use.

Then I guess jasmine/phantoms is not able read sth via the link, but the jasmine task still able to start.

so by copying the node_module under project folder rather than create a link, it get solved.

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

No branches or pull requests

3 participants