使用phantomjs的karma聚合物测试elementSetup失败

使用phantomjs的karma聚合物测试elementSetup失败,phantomjs,polymer,karma-runner,Phantomjs,Polymer,Karma Runner,我正在尝试使用karma polymer测试,看看它是否能和angularjs一起使用聚合物元素。我有bolierplate html测试js文件和同一目录中的元素 我的测试: (function() { 'use strict'; elementSuite('seed-element', 'boilerplate', function() { suite('attributes', function() { test('testing polymer element',

我正在尝试使用karma polymer测试,看看它是否能和angularjs一起使用聚合物元素。我有bolierplate html测试js文件和同一目录中的元素

我的测试:

(function() {
'use strict';
elementSuite('seed-element', 'boilerplate', function() {
    suite('attributes', function() {
        test('testing polymer element', function(done) {

        });
    });
});
}());
bolierplate.html:

<!doctype html>
<html>
<head>
<title>Polymer Element Test</title>
<meta charset="UTF-8">

<!-- Make sure the web components polyfill is loaded -->
<script src="../../public/bower_components/platform/platform.js"></script>
<script src="../../public/bower_components/webcomponentsjs/webcomponents.min.js"></script>
</head>
<body>
<seed-element>
<p>This is <content/></p>
</seed-element>
</body>
</html>
运行karma时出错:

PhantomJS 1.9.7 (Mac OS X) ERROR
TypeError: 'undefined' is not a function (evaluating 'elementSetup.bind(this, name, boilerplate)')
at /Users/212437040/dev/APM_Code/Avid/apm-application/node_modules/karma-polymer-test/elementSuite.js:141

有人有任何指针吗?

PhantomJS
适用于2.0之前的版本,2.0.0以后的版本不再需要。

我对karma和polymer没有多少经验,因此建议您使用此垫片。谢谢。我确实从您提供的url安装了poly,并参考了我的样板文件中的function.js,但我仍然有相同的问题。你知道怎么申请吗?我安装了npm以获得垫片。
PhantomJS 1.9.7 (Mac OS X) ERROR
TypeError: 'undefined' is not a function (evaluating 'elementSetup.bind(this, name, boilerplate)')
at /Users/212437040/dev/APM_Code/Avid/apm-application/node_modules/karma-polymer-test/elementSuite.js:141