AndrewKeig / protractor-cucumber

protractor-cucumber
MIT License
73 stars 59 forks source link

ReferenceError: support is not defined #8

Closed michaelandrew closed 10 years ago

michaelandrew commented 10 years ago

So I've set everything as accordingly in the README.md however when I attempt to run any sort of .feature I get the error; ReferenceError: support is not defined

Full stack trace available:

ReferenceError: support is not defined
  at World.<anonymous> (/Users/michaelandrewchadwick/Documents/Old St Labs/www/vizibl/client/features/step_definitions/homepage/steps.js:4:5)
  at Object.invoke (/usr/local/lib/node_modules/cucumber/lib/cucumber/support_code/step_definition.js:84:14)
  at Object.execute (/usr/local/lib/node_modules/cucumber/lib/cucumber/ast/step.js:174:22)
  at Object.acceptVisitor (/usr/local/lib/node_modules/cucumber/lib/cucumber/ast/step.js:161:12)
  at Object.executeStep (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:272:12)
  at Object.processStep (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:267:14)
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:119:16
  at callUserFunctionAndBroadcastAfterEvent (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:143:9)
  at iterate (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:52:11)
  at Object.forEach (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:62:7)
  at broadcastToListeners (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:170:19)
  at onRuntimeListenersComplete (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:166:9)
  at iterate (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:52:11)
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:59:11
  at hear (/usr/local/lib/node_modules/cucumber/lib/cucumber/listener.js:8:9)
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/listener/progress_formatter.js:16:7
  at hear (/usr/local/lib/node_modules/cucumber/lib/cucumber/listener.js:8:9)
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/listener/summary_formatter.js:16:7
  at Object.hear (/usr/local/lib/node_modules/cucumber/lib/cucumber/listener.js:8:9)
  at Object.hear (/usr/local/lib/node_modules/cucumber/lib/cucumber/listener/summary_formatter.js:15:18)
  at Object.hear (/usr/local/lib/node_modules/cucumber/lib/cucumber/listener/progress_formatter.js:15:22)
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:171:51
  at processItem (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:58:9)
  at iterate (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:50:11)
  at Object.forEach (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:62:7)
  at broadcastToListeners (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:170:19)
  at Object.broadcastEvent (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:162:7)
  at Object.broadcastBeforeEvent (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:153:12)
  at Object.broadcastEventAroundUserFunction (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:137:12)
  at Object.visitStep (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:116:12)
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/ast/scenario.js:98:17
  at processItem (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:58:9)
  at iterate (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:50:11)
  at Object.forEach (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:62:7)
  at Object.instructVisitorToVisitSteps (/usr/local/lib/node_modules/cucumber/lib/cucumber/ast/scenario.js:97:13)
  at Object.instructVisitorToVisitScenarioSteps (/usr/local/lib/node_modules/cucumber/lib/cucumber/ast/scenario.js:93:12)
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/ast/scenario.js:78:14
  at Object.instructVisitorToVisitBackgroundSteps (/usr/local/lib/node_modules/cucumber/lib/cucumber/ast/scenario.js:88:9)
  at Object.acceptVisitor (/usr/local/lib/node_modules/cucumber/lib/cucumber/ast/scenario.js:77:12)
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:59:24
  at iterate (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:52:11)
  at Object.forEach (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:62:7)
  at Object.visitBeforeSteps (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:101:19)
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:58:18
  at callUserFunctionAndBroadcastAfterEvent (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:143:9)
  at iterate (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:52:11)
  at Object.forEach (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:62:7)
  at broadcastToListeners (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:170:19)
  at onRuntimeListenersComplete (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:166:9)
  at iterate (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:52:11)
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:59:11
  at hear (/usr/local/lib/node_modules/cucumber/lib/cucumber/listener.js:8:9)
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/listener/progress_formatter.js:16:7
  at hear (/usr/local/lib/node_modules/cucumber/lib/cucumber/listener.js:8:9)
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/listener/summary_formatter.js:16:7
  at handleBeforeScenarioEvent (/usr/local/lib/node_modules/cucumber/lib/cucumber/listener/stats_journal.js:24:5)
  at Object.hear (/usr/local/lib/node_modules/cucumber/lib/cucumber/listener.js:6:9)
  at Object.hear (/usr/local/lib/node_modules/cucumber/lib/cucumber/listener/summary_formatter.js:15:18)
  at Object.hear (/usr/local/lib/node_modules/cucumber/lib/cucumber/listener/progress_formatter.js:15:22)
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:171:51
  at processItem (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:58:9)
  at iterate (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:50:11)
  at Object.forEach (/usr/local/lib/node_modules/cucumber/lib/cucumber/type/collection.js:62:7)
  at broadcastToListeners (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:170:19)
  at Object.broadcastEvent (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:162:7)
  at Object.broadcastBeforeEvent (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:153:12)
  at Object.broadcastEventAroundUserFunction (/usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:137:12)
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/runtime/ast_tree_walker.js:55:14
  at /usr/local/lib/node_modules/cucumber/lib/cucumber/support_code/library.js:93:11
  at process._tickCallback (node.js:419:13)
  at Function.Module.runMain (module.js:499:11)
  at startup (node.js:119:16)
  at node.js:906:3
ericraio commented 10 years ago

:+1: I have the same issue.

AndrewKeig commented 10 years ago

Your missing the line :

var support = require('../support');

I have added an example to this repo.