Top "Karma-jasmine" questions

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

AngularJS Jasmine Test Fails: Failed to instantiate module

My angular app worked great and so did my tests, using karma and jasmine, until I added a dependency in …

javascript angularjs jasmine angular-ui-bootstrap karma-jasmine
Some of your tests did a full page reload - error when running Jasmine tests

I'm running into an issue where when I run my tests on Jasmine, I get this error below. The problem …

angularjs unit-testing jasmine karma-jasmine
How to mock a window.location function in Karma/jasmine

I would like to mock a functionality in Karma who returns a file after clicking a download button. I have …

angularjs unit-testing karma-jasmine
Unit test Angular with Jasmine and Karma, Error:Can't bind to 'xxx' since it isn't a known property of 'xxxxxx'.

I have a problem with an unit test in angular 5 with Jasmine and Karma. The error is: "Can't bind to …

angular karma-jasmine
Error: Unexpected value 'FormGroup' declared by the module 'DynamicTestModule'

Our project structure follows this: Angular2-webpack-starter. Our project successfully compiles, build and can be seen in the browser. No …

javascript angular typescript karma-jasmine angular2-testing
Mock custom service in angular2 during unit test

I'm trying to write a unit test for component used in my service. Component and service work fine. Component: import {…

unit-testing angular mocking karma-jasmine
Jasmine angular unit test 'Cannot read 'property' of undefined

I have just started learning angular unit testing. However, this test on a function with http call fails. I have …

javascript angularjs unit-testing karma-jasmine karma-mocha
Unit test Angular Material Dialog - How to include MAT_DIALOG_DATA

I am trying to unit test this material dialog to test if the template is rendering the right injected object. …

angular unit-testing karma-jasmine angular-material2 angular-test
Unit Testing angular2 component with imported module

I am trying to write a test on a component which uses angular-material2, but when I add it to my …

angular typescript karma-jasmine angular2-testing angular-material2