Top "Karma-jasmine" questions

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

How to get better test reports in the console?

I have a fairly simple karma.config.js file basePath = '../'; files = [ JASMINE, JASMINE_ADAPTER, 'js/lib/angular*.js', …

javascript node.js karma-jasmine karma-runner
mock angular service/promise in a karma/jasmine test

I'm trying to write a karma/jasmine test and I would like some explanations about how mocks are working on …

angularjs unit-testing karma-runner karma-jasmine
Testing ngOnChanges lifecycle hook in Angular 2

Given the following code I try to test the ngOnChanges lifecycle hook of Angular2: import { it, inject, fdescribe, beforeEachProviders, } from …

angular karma-jasmine angular2-components angular2-testing
Angular 4 - Failed: Can't resolve all parameters for ActivatedRoute: (?, ?, ?, ?, ?, ?, ?, ?)

I have referred the following link to get the answers, but I couldn't find any working solution for my scenario. …

angular unit-testing karma-jasmine router testbed
Conditionally ignore individual tests with Karma / Jasmine

I have some tests that fail in PhantomJS but not other browsers. I'd like these tests to be ignored when …

jasmine karma-runner karma-jasmine
How to make material components work with Karma in unit testing Angular

I have an angular CLI project set up. I've made a form that uses angular material components, like <md-card&…

javascript angular angular-material karma-jasmine angular-cli
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
Unable to find a suitable version for angular with bower installation error for angular-animate module

I am using Angular 1.2.6. I am trying to use bower to install angular-animate and ngAnimate-animate.css. I've tried installing (bower …

angularjs bower ng-animate yeoman-generator karma-jasmine
How to unit test if an angular 2 component contains another component

I'm quite new to angular 2. I have a component which in turn has some other components in its template. How …

angular karma-jasmine angular2-testing
Testing - Can't resolve all parameters for (ClassName)

Context I created an ApiService class to be able to handle our custom API queries, while using our own serializer + …

angular karma-jasmine angular2-services angular2-testing angular2-injection