Top "Karma-jasmine" questions

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

Angular tests failing with Failed to execute 'send' on 'XMLHttpRequest'

I am trying to test my angular 4.1.0 component - export class CellComponent implements OnInit { lines: Observable<Array<ILine&…

angular unit-testing karma-jasmine angular-cli
Angular - unit test for a subscribe function in a component

Angular 4 unit test for a subscribe. I want to test that my subscribe returns an array of Users. I want …

angular unit-testing jasmine karma-jasmine
Angular 6 - NullInjectorError: No provider for HttpClient in unit tests

I am importing and using HttpClient in a service as follows: import { Injectable } from '@angular/core'; import { HttpClient } from …

angular karma-jasmine angular-test
Error: You need to include some adapter that implements __karma__.start method

I'm trying to add some unit tests to one of my projects. So far I've installed and configured karma, and …

karma-runner karma-jasmine
Angular 2 Karma Test 'component-name' is not a known element

In the AppComponent, I'm using the nav component in the HTML code. The UI looks fine. No errors when doing …

javascript node.js angular typescript karma-jasmine
Karma/Jasmine times out without running tests

I'm trying to run Karma/Jasmine from Grunt on a project generated with http://newtriks.com/2013/12/31/automating-react-with-yeoman-and-grunt/ Karma launches PhantomJS (…

javascript node.js karma-runner karma-jasmine webpack
Firebase App named '[DEFAULT]' already exists (app/duplicate-app)

Hi I am trying to unit test while developing a simple web with AngularJS + Firebase, but I have a problem …

angularjs unit-testing firebase karma-runner karma-jasmine
Expect Arrays to be equal ignoring order

With Jasmine is there a way to test if 2 arrays contain the same elements, but are not necessarily in the …

javascript jasmine karma-jasmine
angular2 testing using jasmine for subscribe method

I have a spec code to test like this it('login test', () => { const fixture = TestBed.createComponent(component); fixture.detectChanges(); …

unit-testing angular karma-jasmine
Error: No provider for "framework:jasmine"! (Resolving: framework:jasmine)

I have run on my windows console: npm install -g yo grunt-cli bower npm install -g generator-angular yo angular Then …

npm jasmine karma-runner karma-jasmine