Skip to content

Instantly share code, notes, and snippets.

@wayneseymour
Created February 18, 2014 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wayneseymour/9077705 to your computer and use it in GitHub Desktop.
Save wayneseymour/9077705 to your computer and use it in GitHub Desktop.
waseymour@OR-WASEYMOUR-L1 /c/dev/prj/git-repos/asgard.js (jasmine)
$ ./nightwatch -t tests/nightwatch-e2e/jasmine-spike-test.js
ERROR There was an error while starting the test runner:
ReferenceError: describe is not defined
at Object.<anonymous> (c:\dev\prj\git-repos\asgard.js\tests\nightwatch-e2e\jasmine-spike-test.js:3:1)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at runTestModule (c:\dev\prj\git-repos\asgard.js\node_modules\nightwatch\runner\run.js:260:24)
at runFiles (c:\dev\prj\git-repos\asgard.js\node_modules\nightwatch\runner\run.js:169:14)
at runner [as run] (c:\dev\prj\git-repos\asgard.js\node_modules\nightwatch\runner\run.js:252:5)
waseymour@OR-WASEYMOUR-L1 /c/dev/prj/git-repos/asgard.js (jasmine)
@christian-bromann
Copy link

Could you just try to run it via $ node tests/nightwatch-e2e/jasmine-spike-test.js? Nightwash uses selenium-webdriver how do you use nightwash together with WebdriverJS?

@wayneseymour
Copy link
Author

I use webdriver-manager start from protractor

@wayneseymour
Copy link
Author

I'll try your suggestion now. ...sorry, I was in a sass meeting

@wayneseymour
Copy link
Author

this is what I got:
waseymour@OR-WASEYMOUR-L1 /c/dev/prj/git-repos/asgard.js (jasmine)
$ node tests/nightwatch-e2e/jasmine-spike-test.js

c:\dev\prj\git-repos\asgard.js\tests\nightwatch-e2e\jasmine-spike-test.js:3
describe('my webdriverjs tests', function() {
^
ReferenceError: describe is not defined
    at Object.<anonymous> (c:\dev\prj\git-repos\asgard.js\tests\nightwatch-e2e\jasmine-spike-test.js:3:1)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3

@wayneseymour
Copy link
Author

but, if i do jasmine-node spec, the spec I have defined works

...and thanks for your help man.

@christian-bromann
Copy link

ahh right... describe is a jasmine "thing" so you have to run it in jasmine context (for example by using jasmine-node). Glad that everything works fine now ;-)

@wayneseymour
Copy link
Author

but its not working
:(

@wayneseymour
Copy link
Author

hold on, I may be confusing myself (I'm eval-ing nightwatchjs vs webdriver.io)

@wayneseymour
Copy link
Author

ok, webdriver.io is working

...btw, I refer to your lib as webriver.io to all of my colleagues to keep it distinct from selenium-webdriverjs.
I wish more people did this. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment