Top "Karma-runner" questions

Karma provides developers a testing environment where they don't have to set up many things, rather just write code and get instant feedback in order to improve productivity and creativity.

Angular 7 Test: NullInjectorError: No provider for ActivatedRoute

Hi have some error with testing my App made with Angular 7. I do not have much experience in angular, so …

angular testing jasmine karma-runner
Unknown provider CookieStore

I am having service where I want to use the $cookieStore module. It works fine, but when unit testing it …

angularjs jasmine angularjs-service karma-runner
How do unit test with angular-translate

I have uses angular translate from here (http://pascalprecht.github.io/angular-translate/) and it's just work fine, but it break …

unit-testing angularjs mocking yeoman karma-runner
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 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
Angular error running Karma tests: HTML5 mode requires a <base> tag

I have a single-page Angular app with a Rails backend. I am using a tag in my index.html file, …

angularjs karma-runner
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
Issue running karma task from gulp

I am trying to run karma tests from gulp task and I am getting this error: Error: 1 at formatError (C:\…

node.js gulp karma-runner
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