meteor-velocity

Testing Meteor packages with Velocity?

走远了吗. 提交于 2019-12-11 02:07:00
问题 Velocity is an amazing testing framework for Meteor and I am currently using it to test my application code. Now I added a local package to the app, but I don't know how (or if) I can test the package with Velocity, too. I would like to drop tinyTest in favor for a consistent testing framework - Velocity. Is it possible to test packages with Velocity? How should the file structure look like? 回答1: Yes, it is possible to test packages with sanjo:jasmine. It works in nearly the same way as with

Testing Meteor with Velocity at Codeship

南笙酒味 提交于 2019-12-06 09:43:28
问题 I'm trying to configure a CI infrastructure at Codeship. My local meteor --test command works like charm, but I'm getting a weird error at Codeship. Local: I20141208-12:29:42.602(2)? Started I20141208-12:29:42.602(2)? . I20141208-12:29:42.603(2)? I20141208-12:29:42.603(2)? 1 spec, 0 failures I20141208-12:29:42.603(2)? Finished in 0.014 seconds PASSED jasmine-server-unit : Job => Job should be created with title, description, location and isRemote Codeship: => Started proxy. => Started MongoDB

Requiring timeouts when testing Meteor with Velocity and Jasmine

陌路散爱 提交于 2019-12-06 05:22:20
问题 Pretty new to meteor, velocity and jasmine so not sure if I am doing something wrong, using Jasmine for something it's not designed for, or this is just the way it works. I am finding I need to set timeouts for pretty much all of my tests in order to get them to pass. Should this be the case or am I doing something incorrectly? For example some tests I am running to check validation messages: describe("add quote validation", function() { beforeEach(function (done) { Router.go('addQuote');

Chimpjs and Meteor: method calls in tests without using Velocity

只愿长相守 提交于 2019-12-05 02:12:44
问题 This app shows an example of testing Meteor with Cucumber: https://github.com/mhurwi/cucumber-meteor-tutorial It works well with Velocity. But my computer becomes very slow when starting an app with Velocity and I don't want it to always run when I'm developing. So I tried to use Chimp as an NPM module by using chimp --ddp=http://localhost:3000 as proposed here: https://chimp.readme.io/docs/getting-started-with-meteor-cucumber But the tests with method calls (the methods are in tests/cucumber

Testing Meteor with Velocity at Codeship

Deadly 提交于 2019-12-04 17:01:05
I'm trying to configure a CI infrastructure at Codeship. My local meteor --test command works like charm, but I'm getting a weird error at Codeship. Local: I20141208-12:29:42.602(2)? Started I20141208-12:29:42.602(2)? . I20141208-12:29:42.603(2)? I20141208-12:29:42.603(2)? 1 spec, 0 failures I20141208-12:29:42.603(2)? Finished in 0.014 seconds PASSED jasmine-server-unit : Job => Job should be created with title, description, location and isRemote Codeship: => Started proxy. => Started MongoDB. => Errors prevented startup: While Building the application: node_modules/velocity-cli/velocity-cli

Requiring timeouts when testing Meteor with Velocity and Jasmine

南笙酒味 提交于 2019-12-04 11:05:32
Pretty new to meteor, velocity and jasmine so not sure if I am doing something wrong, using Jasmine for something it's not designed for, or this is just the way it works. I am finding I need to set timeouts for pretty much all of my tests in order to get them to pass. Should this be the case or am I doing something incorrectly? For example some tests I am running to check validation messages: describe("add quote validation", function() { beforeEach(function (done) { Router.go('addQuote'); Tracker.afterFlush(function(){ done(); }); }); beforeEach(waitForRouter); it("should show validation when

Chimpjs and Meteor: method calls in tests without using Velocity

时光总嘲笑我的痴心妄想 提交于 2019-12-03 17:11:15
This app shows an example of testing Meteor with Cucumber: https://github.com/mhurwi/cucumber-meteor-tutorial It works well with Velocity. But my computer becomes very slow when starting an app with Velocity and I don't want it to always run when I'm developing. So I tried to use Chimp as an NPM module by using chimp --ddp=http://localhost:3000 as proposed here: https://chimp.readme.io/docs/getting-started-with-meteor-cucumber But the tests with method calls (the methods are in tests/cucumber/fixtures/) don't work: Error: Method not found [404] Does anyone have an idea of what I should do in

Meteor / Jasmine / Velocity : how to test a server method requiring logged in user?

我们两清 提交于 2019-12-03 12:54:32
Using velocity/jasmine, I'm a bit stuck on how I should test a server-side method requiring that there be a currently logged-in user. Is there a way to make Meteor think a user is logged in via stub/fake ? myServerSideModel.doThisServerSideThing = function(){ var user = Meteor.user(); if(!user) throw new Meteor.Error('403', 'not-autorized'); } Jasmine.onTest(function () { describe("doThisServerSideThing", function(){ it('should only work if user is logged in', function(){ // this only works on the client :( Meteor.loginWithPassword('user','pwd', function(err){ expect(err).toBeUndefined(); });

How do you return from a Meteor.methods stub in Cucumber

若如初见. 提交于 2019-11-29 12:01:32
I have just begun using Cucumber (xolvio:cucumber@0.20.2_1) with Meteor to test my project, and I am having difficulty returning a value from a Meteor.methods stub I created within a step definition. register-user.js this.When(/^he clicks the verification link in his email$/, function () { console.log(this.server.call('_getUser')); }); registration.js Meteor.methods({ _getUser: function() { return Meteor.users.findOne({'emails.address': 'anyemail@email.com'}); }); The log outputs a huge object that looks like the state of the system. I noticed elsewhere that someone suggested this.server.call(

How do you return from a Meteor.methods stub in Cucumber

人走茶凉 提交于 2019-11-28 05:47:29
问题 I have just begun using Cucumber (xolvio:cucumber@0.20.2_1) with Meteor to test my project, and I am having difficulty returning a value from a Meteor.methods stub I created within a step definition. register-user.js this.When(/^he clicks the verification link in his email$/, function () { console.log(this.server.call('_getUser')); }); registration.js Meteor.methods({ _getUser: function() { return Meteor.users.findOne({'emails.address': 'anyemail@email.com'}); }); The log outputs a huge