Top "Jasmine-jquery" questions

An extension to Jasmine JavaScript library for easier testing jQuery functions.

How do I add DOM elements in jasmine tests without using external html files?

I'm writing some simple jasmine tests and I'm getting an exception since the code I'm testing is looking for a …

jasmine jasmine-jquery
Jasmine.js Testing - spy on window.open

JS var link = this.notificationDiv.getElementsByTagName('a')[0]; link.addEventListener('click', function (evt){ evt.preventDefault(); visitDestination(next); }, false); } var visitDestination = function(…

javascript jasmine jasmine-jquery
How to resolve $q.all promises in Jasmine unit tests?

My controller has code like below: $q.all([qService.getData($scope.id), dService.getData(), qTService.get()]) .then(function (allData) { $scope.…

angularjs unit-testing jasmine karma-runner jasmine-jquery
spyOn could not find an object to spy upon for all()

I'm getting the above error when I want to mock http REST services created using Restangular. Here's my piece of …

angularjs jasmine karma-jasmine jasmine-jquery
How would I test a $scope.watch (AngularJS) change in Jasmine?

I've just recently started writing something with AngularJS and I'm not sure how to go about writing a test for …

jquery angularjs jasmine angularjs-directive jasmine-jquery
Testing a click event with Jasmine that appends a style sheet to the head

jQuery $(".theme-picker").click(function () { $('head').append('<link rel="stylesheet" href="" type="text/css" media="screen" id="theme_switcher"/&…

jquery jasmine jasmine-jquery
How to assert a spy is invoked with event on click using jasmine?

I'm writing a simple click handler and need the event passed in (like so) Thing = function($){ var MyObject = function(opts){ …

javascript jasmine dom-events jasmine-jquery
Jasmine spies not being called

I am having some trouble implimenting spying in Jasmine I want to check if a link has been clicked on …

jasmine jasmine-jquery
Jasmine jQuery: Using toBeHidden() and toBeVisible()

I need help working with the toBeHidden() and toBeVisible() methods of jQuery-Jasmine. When a user checks a checkbox, a text …

jquery jasmine bdd jasmine-jquery
jasmine-jquery loadFixtures with Jasmine 2.0 won't work

I've spent about a day debugging this, and I'm at a loss. It looks like something isn't working in jasmine-jquery 2.0.2. …

jasmine jasmine-jquery