2013-06-27 56 views
1

我正在尝试使用phantom-jasmine。我在我的系统(Mountain Lion和Ubuntu)上安装了phantomjs(1.9.1),并使用npm安装了phantom-jasmine。幻影茉莉花找不到规格

问题是,当我尝试运行phantom-jasmine examples/TestRunner.html从他们的例子我得到0规格,0失败虽然它应该是3规格,输出1失败。

如果我从浏览器中打开TestRunner.html,它的行为如预期,但幻影茉莉花似乎无法找到规格。

另一件事是,当我提供了绝对路径(幻影茉莉/home/me/phantom-jasmine/examples/TestRunner.html到TestRunner.html this发生

+0

您是否曾经为此找到过解决方案? –

回答

0

我有同样的问题。在与此同时,我最终切换到一组新的脚本来运行命令行phantomjs茉莉测试。见SenchaProSvcs/UnitTestDemo

2

不完全知道为什么,但我从通话省略TestRunner.html运行的例子。像这样:

phantom-jasmine examples 

看来,使用npm安装时获得的分支/版本与https://github.com/jcarver989/phantom-jasmine中描述的不匹配。

看着安装的readme.md帮助了我。

0

我面临着与幻影茉莉花同样的问题。为了得到这个工作,我使用了phantom-jasmine回购的run_jasmine_test.coffee文件。我在回购复制这个文件(及控制台runner.js),并通过我的终端中运行以下命令通过phantomjs调用的TestRunner:

phantomjs lib/jasmine/run_jasmine_test.coffee testRunner.html 

我来到这里与我的输出一致的输出当我直接在浏览器中运行testRunner.html时。

希望这会有所帮助。