Jasmine is a behavior-driven development framework for testing JavaScript code. It does not depend on any other JavaScript frameworks. It does not require a DOM. And it has a clean, obvious syntax so that you can easily write tests.

learn more… | top users | synonyms

1
vote
1answer
78 views

Angular filter to format temperature

Below is a basic filter I created with Angular that does temperature conversion. I'd like to get thoughts on how to improve this code from both an Angular perspective and a general JS perspective. ...
4
votes
1answer
325 views

Jasmine unit tests for simple toggle class

Using JavaScript/jQuery I created a simple toggle and started writing unit tests for it using Jasmine. I am not sure, however, if I should be testing for things ...
4
votes
1answer
943 views

Testing async YouTube API calls using Jasmine 2.0

I'm upgrading my project from YouTube's V2 API to their V3 API. I'm also taking the time to upgrade to Jasmine 2.0 since I already need to look at my test cases. Here's a couple of test cases and the ...
2
votes
1answer
701 views

Integration test for database access

This integration test involves database access and hence opening and closing a database connection. Does it look correct? I am concerned about ensuring the the database connection is closed should the ...
2
votes
1answer
122 views

Is this a good approach to unit testing?

I'm relatively new to unit testing and having gone through quite a bit of pain I was starting to feel pretty good about my tests. The problem is, now I have a nice set of green ticks I'm also ...
3
votes
1answer
2k views

spyOn click events and check call function

I'm trying to write Jasmine tests and I need a review and some advice on spying on events and their behavior. ...