Questions tagged [meteor-jasmine]

12 questions
8
votes
4 answers

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

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 =…
Petrov
  • 4,200
  • 6
  • 40
  • 61
5
votes
1 answer

Requiring timeouts when testing Meteor with Velocity and Jasmine

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…
3
votes
3 answers

shared test fixture for meteor velocity cucumber and jasmine

How do I share a fixture between my cucumber and jasmine test? I can create a fixture with one jasmine server integration test that can be used with other jasmine server integration tests. But (due to different "mirrors" I guess?) I cannot use the…
Nathan Buesgens
  • 1,415
  • 1
  • 15
  • 29
2
votes
0 answers

Only getting partial user publication in Meteor Jasmine test

I have a client integration test to ensure my admin user can change user roles via the user management interface in my app. However, when I query for the user I want to change, the query comes back empty even though it has been created in the…
raddevon
  • 3,290
  • 4
  • 39
  • 49
2
votes
1 answer

Meteor integration testing, rest api endpoint in velocity's mirror with jasmine

I'm trying to create a test for an API endpoint written with meteor. I'm using jasmine and velocity. It's intended to run within the same project, that's why I'm using them. The problem comes when I'm trying to run the test and check for data in the…
1
vote
1 answer

Is there any way to debug meteor-jasmine client-side unit tests?

I'm writing a small meteor app and simultanously I'm trying to practice TDD. I've run into a small hurdle in that I can't figure out how I can run my Jasmine unit tests through a debugger. The tests are stored in [project…
Godsmith
  • 2,492
  • 30
  • 26
1
vote
0 answers

Why does Tracker reactivity not kick in exactly half the time when using multiple computations in one Jasmine describe block?

When testing reactivity with Jasmine some Tracker computations started behaving in a very intriguing way: Exactly half the computations are reactive, the other half is not. What I did to test this behaviour is the following: //In a describe…
Kyll
  • 7,036
  • 7
  • 41
  • 64
1
vote
1 answer

Jasmine is complaining that an object is not equal to an object

I am trying to do some integration testing using jasmine. I am doing the following: Jasmine.onTest(function () { describe("Form", function() { it("should lazy-load HeaderFields and FormFields", function() { var hf1 = new HeaderField({ …
CodeChimp
  • 8,016
  • 5
  • 41
  • 79
1
vote
3 answers

Running code only for tests using Jasmine package

I am using the sanjo:jasmine and velocity:html-reporter packages in my app to try and implement some unit and integration testing. Using this tutorial as a guide, I have a few unit tests and a couple integration tests done. What I am not able to…
CodeChimp
  • 8,016
  • 5
  • 41
  • 79
0
votes
1 answer

Incompatible packages in meteor (autoform-file and velocity)

This might be a rather general question: How to deal with incompatible packages in meteor? In my case I'm using the testing suite velocity and jasmine, which is not compatible with the current version of autoform-file package. My html-reporter would…
Ronin
  • 7,322
  • 6
  • 36
  • 54
0
votes
1 answer

Unit tests in meteor can't find the code they need to test

I'm struggling with unit tests in Meteor. I want to use the velocity, jasmine package but I must be doing something wrong. The tests don"t seem to work because the test can't find the code to test. The test project is available on github. The code…
Rob Van Pamel
  • 734
  • 1
  • 8
  • 23
0
votes
1 answer

Proper method for integration testing with sanjo:jasmine and Blaze.render in

I am using sanjo:jasmine to do testing of my app. I am trying to do a simple check to see if a link element is present in my header template using a client-side integration test and Blaze.render. I am using alanning:roles for managing the…
CodeChimp
  • 8,016
  • 5
  • 41
  • 79