Top "Karma-jasmine" questions

Karma-Jasmine is an adapter for the Jasmine testing framework,which is shipped with Karma by default.

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
Angular 2.0.0 - Testing " imported by the module 'DynamicTestModule' "

I am having a problem in testing app.component.ts in Angular 2. I am using angular-cli. Whenever I run ng …

unit-testing angular karma-jasmine
Angular unit-test controllers - mocking service inside controller

I have the following situation: controller.js controller('PublishersCtrl',['$scope','APIService','$timeout', function($scope,APIService,$timeout) { APIService.get_…

unit-testing angularjs karma-runner karma-jasmine
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
Angular mock $httpBackend give No pending request to flush

Following the official guide at angularJS $httpBackend I'll do this test, but Karma give me this error: Error: No pending …

angularjs karma-jasmine
Angular 2 Final Release Router Unit Test

How do I unit test routers in Angular version 2.0.0 with karma and jasmine? Here's what my old unit test looks …

javascript angular karma-jasmine angular2-routing angular2-testing
Using Karma, how do I exclude all files that match a pattern except for those within a specific sub-folder?

I have a simple AngularJs application setup, that looks a bit like this: client vendor angular bootstrap jquery ... app.module.…

javascript angularjs karma-jasmine
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
How to change value of a select box in angular2 unit test?

I have an Angular2 component that contains a select box that looks like <select [(ngModel)]="envFilter" class="form-control" name="…

unit-testing angular typescript karma-jasmine angular2-testing
Angular mock fails to inject my module dependencies

I want to test an Angular controller for my application fooApp, defined as follow: var fooApp = angular.module('fooApp', [ 'ngRoute', …

angularjs jasmine karma-runner karma-jasmine angular-mock