我正在尝试设置cucumber-js grunt和zombie。我正在读一个教程,似乎当我尝试运行cucumber-js时,我得到了这个:
C:\webroot\Sari>cucumber-js
C:\webroot\Sari\node_modules\zombie\node_modules\jsdom\node_modules\cssstyle\lib\CSSStyleDeclaration.js:26
/**
^^^
SyntaxError: Unexpected token ILLEGAL
at exports.runInThisContext (vm.js:73:16)
at Module._compile (module.js:443:25)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\webroot\Sari\node_modules\zombie\node_modules\jsdom\lib\jsdom\level2\style.js:7:16)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\webroot\Sari\node_modules\zombie\node_modules\jsdom\lib\jsdom\living\index.js:9:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\webroot\Sari\node_modules\zombie\node_modules\jsdom\lib\jsdom.js:9:11)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\webroot\Sari\node_modules\zombie\node_modules\jsdom\lib\jsdom\browser\index.js:2:21)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\webroot\Sari\node_modules\zombie\lib\document.js:13:16)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\webroot\Sari\node_modules\zombie\lib\history.js:42:20)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\webroot\Sari\node_modules\zombie\lib\tabs.js:7:21)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\webroot\Sari\node_modules\zombie\lib\index.js:18:12)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at Object.<anonymous> (C:\webroot\Sari\features\support\world.js:3:14)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\node_modules\coffee-script\lib\coffee-script\register.js:45:36)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\lib\cucumber\cli\support_code_loader.js:60:29
at Array.forEach (native)
at Object.wrapper (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\lib\cucumber\cli\support_code_loader.js:59:15)
at Object.initializer (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\lib\cucumber\cli\support_code_loader.js:20:37)
at Object.Library (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\lib\cucumber\support_code\library.js:131:25)
at Object.getSupportCodeLibrary (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\lib\cucumber\cli\support_code_loader.js:10:58)
at Object.getSupportCodeLibrary (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\lib\cucumber\cli\configuration.js:51:52)
at Object.getSupportCodeLibrary (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\lib\cucumber\runtime.js:42:46)
at Object.start (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\lib\cucumber\runtime.js:17:37)
at Object.runSuiteWithConfiguration (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\lib\cucumber\cli.js:19:15)
at Object.run (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\lib\cucumber\cli.js:12:14)
at Object.<anonymous> (C:\Users\Sari.Rahal\AppData\Roaming\npm\node_modules\cucumber\bin\cucumber.js:4:5)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
at startup (node.js:129:16)
at node.js:814:3
根据我的阅读,它可能是一个有问题的JavaScript解释器。我不知道从哪里开始。我是否设置了错误的模块?我需要更新一些东西吗?如果不是:我需要查看哪个文件?任何见解在这一点上都会有所帮助。如果您需要更多详细信息,请告诉我们。
Feature: Example feature
As a user of Google
I want to have documentation on Google on an About page
So that I can learn about Google
Scenario: Reading About Google
Given I am on the Google homepage
When I go to the About page
Then I should see "About Google" as the page title
And I should see the text "Google's mission is to organize the world's information and make it universally accessible and useful."
答案 0 :(得分:0)
问题是我正在运行最新版本的僵尸,它改变了代码的格式。回滚到以前的版本后,它工作。