当我尝试使用
JASMINE_BROWSER=PhantomJS meteor --test
我从 PhantomJS 得到以下输出
[PhantomJS] TypeError: instanceof called on an object with an invalid prototype property.
除非我在浏览器中打开应用程序然后测试完成,否则什么都不会发生。似乎与此已关闭的问题相同。我应该补充一点,此时我唯一的集成测试(以排除 PhantomJS 问题)是
describe("jasmineTest", function(){
it("1 equals 1", function(){
expect(1).toEqual(1);
});
});
我的版本是
$ meteor list
accounts-password 1.1.1 Password support for accounts
alanning:roles 1.2.13 Role-based authorization
dburles:google-maps 1.1.3 Google Maps Javascript API v3
fortawesome:fontawesome 4.4.0 Font Awesome (official): 500+ scalable vector icons, customizable via CSS, Retina friendly
imsky:holder 2.8.1 Holder uses SVG to render image placeholders entirely in browser.
insecure 1.0.3 Allow all database writes by default
iron:router 1.0.9 Routing specifically designed for Meteor
jquery 1.11.3_2 Manipulate the DOM using CSS selectors
manuelschoebel:wait-on-lib 0.3.0 Use Meteor Iron-Routers waitOn to load external javascript
materialize:materialize 0.97.0 Materialize (official): A modern responsive front-end framework based on Material Design
matteodem:easy-search 1.6.2 Easy-to-use search with Blaze Components (+ Elastic Search support)
meteor-platform 1.2.2 Include a standard set of Meteor packages in your app
meteorhacks:kadira 2.23.0 Performance Monitoring for Meteor
msavin:mongol 1.1.5 The insanely handy development package for Meteor.
nicolaslopezj:tabular-materialize 1.2.1 Datatables for large or small datasets in Meteor
peernohell:c3 1.1.3 C3 (0.4.10) charting library based on D3.
reactive-var 1.0.5 Reactive variable
sacha:spin 2.3.1 Simple spinner package for Meteor
sanjo:jasmine 0.17.0 Velocity integration of the Jasmine testing framework
stevezhu:lodash 3.10.1 A utility library delivering consistency, customization, performance, & extras.
useraccounts:iron-routing 1.12.1 UserAccounts package providing routes configuration capability via iron:router.
useraccounts:materialize 1.12.1 Accounts Templates styled for Materialize Css.
velocity:html-reporter 0.8.2 Reactive Velocity test reports in your app.
更新
该instanceof called on an object with an invalid prototype property
错误似乎可以通过使用 PhantomJS 2 解决。
随后,我找到了一个简单的解决方法,即客户端集成测试未运行,我只需将客户端集成测试移动到客户端单元目录。然而,这似乎正是一种解决方法。我仍然想知道是什么导致了这个问题,以及如何在没有我的 hacky 解决方法的情况下解决它。