测试在命令行中失败,但可以使用Chutzpah在Chrome上运行

时间:2018-07-05 07:34:53

标签: javascript jasmine phantomjs chutzpah

使用chutzpah运行Jasmine单元测试可与Chrome浏览器一起使用,但在命令行中失败。我猜测是由于PhantomJS引起的,但不确定在尝试解析Array.find()时为何失败。我收到以下错误和“ componentList” 是一个数组。

TypeError: undefined is not a constructor (evaluating 'this.componentList.find') in http://localhost:9876/testbin/tests/_Chutzpah.19b7095a5544731098ed458bff5f19d5f2ff6caf.test.html (line 1313)
createTiming@http://localhost:9876/testbin/tests/_Chutzpah.19b7095a5544731098ed458bff5f19d5f2ff6caf.test.html:1146:35
http://localhost:9876/testbin/tests/_Chutzpah.19b7095a5544731098ed458bff5f19d5f2ff6caf.test.html:1595:29
$broadcast@http://localhost:9876/node_modules/angular/angular.js?sha=fd41c4d4e1dad484399eecbaf1192884cfcf98c1:19165:33
prepareRoute@http://localhost:9876/node_modules/angular-route/angular-route.js?sha=f6da9f0b437771adcca41fa695e4e3a7fb6ce716:706:34
$broadcast@http://localhost:9876/node_modules/angular/angular.js?sha=fd41c4d4e1dad484399eecbaf1192884cfcf98c1:19165:33

0 个答案:

没有答案