我想为使用pouchdb + angular-pouchdb的angular应用程序设置单元测试。但是当我运行以下命令时:
karma start karma.conf.js
,我收到以下错误信息:
该angular应用程序在浏览器中正常运行,并且我的karma.conf.js文件包含相同的依赖项,因此我不明白为什么pouchdb-nightly.js会有一个未定义的函数。我错过了什么?PhantomJS 1.9.7 (Mac OS X) ERROR
TypeError: 'undefined' is not a function (evaluating 'eventEmitter[method].bind(eventEmitter)')
at .../public/bower_components/pouchdb/dist/pouchdb-nightly.js:5758
bind
在 phantomjs 中未实现。我不熟悉 karma,无法推荐解决方案。 - Artjom B.