【问题标题】:Run jasmine specs via phantom, got "Can't find variable: describe"通过幻象运行茉莉花规格,得到“找不到变量:描述”
【发布时间】:2012-11-22 05:29:18
【问题描述】:

我在centOS5 linux服务器上运行它作为CI作业时遇到了同样的问题,使用phantomJS 1.7(我自己编译)

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 
...

规范在 WinXP 等其他机器上成功运行。

【问题讨论】:

    标签: node.js jasmine phantomjs


    【解决方案1】:

    最后,它是由这个引起的:我为“node_modules”创建了一个符号链接以重用公共模块,但它阻止了grunt-jasmine-runner 获取某事。 (还不确定)。要解决它,需要将“node_modules”文件直接复制到项目文件夹下。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-02-10
      • 1970-01-01
      • 1970-01-01
      • 2017-09-18
      相关资源
      最近更新 更多