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
0answers
32 views

Jasmine Unit tests for simple Angular backend interaction

I have a simple Angular application that lists some object requests from a backend, allows the users to click once to edit the item, and then click again to update the object in the backend. Here's a ...
0
votes
1answer
219 views

Angular directive test

I'm learning how to write tests in Angular (these are my first tests in general). There are a lot of tutorials out there but each one of them has a different approach. I'm a bit confused if I'm doing ...
1
vote
1answer
1k views

Angular filter to format temperature

This 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 and general JS perspective. The filter should ...
5
votes
1answer
889 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
1k 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
837 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
140 views

Calculate the physical centre

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 ...
4
votes
1answer
3k 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. ...