我尝试使用 PhantomJs.exe 从命令行运行我的 jamsine 规范。这是我的命令行
'path\to\phantomjs\phantomjs.exe run-jasmine.js SpecRunner.html
我从我的规范运行器 html 文件所在的文件夹中运行它。上面的命令抛出以下错误
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.
我已经查看了 phantomjs 组上的http://code.google.com/p/phantomjs/issues/detail?id=365但这对像我这样来自 .net 背景的人没有多大帮助。
到目前为止,我发现 PhantomJs 的 1.3.0 版对我来说很好用。