我想通过 PhantomJS 在控制台中使用 Jasmine 的 jQuery 测试我的 JS 代码,但是ReferenceError: Can't find variable: $
我可以在浏览器中正常测试 Jasmine 的代码。
谢谢您的帮助。
$ phantomjs examples/run-jasmine.js http://localhost:8888/
ReferenceError: Can't find variable: $
http://localhost:8888/public/javascripts/PhotoTable.js:59
ReferenceError: Can't find variable: $
http://localhost:8888/public/javascripts/PhotoTable2.js:129
ReferenceError: Can't find variable: $
http://localhost:8888/public/javascripts/amenimomakezu.js:18
http://localhost:8888/public/javascripts/amenimomakezu.js:20
ReferenceError: Can't find variable: _error
http://localhost:8888/public/javascripts/p121106.js:29
http://localhost:8888/public/javascripts/p121106.js:39
null
Data loaded [object Object]
Data loaded [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Data loaded [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object]
Winter in October
[object Object]
[object Object]
'waitFor()' finished in 200ms.
Animal
Passing 20 specs