Top "Jasmine" questions

Jasmine is a behavior-driven development (BDD) framework for testing JavaScript code.

Unit testing a modalInstance controller with Karma / Jasmine

EDIT : Quick & Dirty solution at the end of this post I am using a modal window from AngularUI-Bootstrap in …

angularjs jasmine karma-runner angular-ui-bootstrap karma-jasmine
Jasmine - Spying on a method call within a constructor

I want to test whether the following method is called with in my Javascript object constructor. From what I have …

javascript testing jasmine spy
Frontend testing: what and how to test, and what tool to use?

I have been writing tests for my Ruby code for a while, but as a frontend developer I am obviously …

testing jasmine frontend ui-automation casperjs
Click() function isn't working in protractor scripts

I'm trying to automate my tests with Protractor and Appium for an AngularJS site with jasmine framework in iPad simulator, …

angularjs jasmine protractor appium end-to-end
How to resolve promises in AngularJS, Jasmine 2.0 when there is no $scope to force a digest?

It seems that promises do not resolve in Angular/Jasmine tests unless you force a $scope.$digest(). This is silly …

angularjs jasmine karma-runner karma-jasmine
Testing a simple AngularJS service using Jasmine

I have a simple service that I am trying to unit test. No matter what I try, either the searchService …

angularjs jasmine karma-runner angularjs-service
How to test 'private' functions in an angular service with Karma and Jasmine

I have a service in my angular app that looks something like this: angular.module('BracketService', []).factory('BracketService', [function() { function …

javascript angularjs unit-testing jasmine angular-services
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
Karma - Chrome failed 2 times (cannot start). Giving up

I've been trying to run my tests using karma-chrome-launcher, but everytime I run my tests it throws this error: INFO […

google-chrome jasmine karma-jasmine