Tag: 茉莉节点

茉莉花节点 – 包括帮手

我试图用茉莉花节点来testing我的Meteor应用程序。 我在助手( spec_helper.js )中列出了一些Meteor框架的方法: var Meteor = { startup: function (newStartupFunction) { Meteor.startup = newStartupFunction; }, Collection: function (collectionName) { Meteor.instantiationCounts[collectionName] = Meteor.instantiationCounts[collectionName] ? Meteor.instantiationCounts[collectionName] + 1 : 1; }, instantiationCounts: {} }; 在这一点上,我需要在spec_helper.js中运行代码(相当于包含其他语言的模块)。 我试过以下,但没有成功: require(['spec_helper'], function (helper) { console.log(helper); // undefined describe('Testing', function () { it('should test Meteor', function () { // that's what […]