Top "Karma-jasmine" questions

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

Angular 4 CLI cannot find name 'jasmine'

I am using the Angular 4 CLI (v.1.0.0) and to handle testing I created some mocks that use jasmine to create …

karma-jasmine angular-cli typescript-typings
Mocking a parent FormGroup via @input in Jasmine

So I have a child component that goes something like this export class ChildComponent implements OnInit { @Input('parentForm') public parentForm: …

unit-testing karma-jasmine angular-reactive-forms formbuilder angular4-forms
Angular 11 Unit Test Code Coverage is Now Breaking

Prior to upgrading to Angular 11, I ran my unit tests with code coverage via the following command: ng test --project …

unit-testing angular-cli karma-jasmine angular11 karma-coverage
How to unit test code inside subscribe for Angular7 unit test case

I want to unit test and get coverage for all code but i am not able to get coverage for …

angular unit-testing observable karma-jasmine subscriber
How do I mock $window injected manually in provider private function?

I have the following provider: angular.module('MyApp').provider('MyDevice', function () { var ngInjector = angular.injector(['ng']), $window = ngInjector.get('$…

angularjs unit-testing karma-jasmine angular-mock
How to test John papa vm.model unit testing with jasmine?

I use John papa angular style guide my controller looks like: following the style John papa style controller style guide: …

angularjs unit-testing angularjs-scope jasmine karma-jasmine
Jasmine - any boolean (jasmine.any(Boolean))

I write unit tests for angular using karma, jasmine. Try to write: expect(item).toEqual(jasmine.any(Boolean)); but got: …

angularjs unit-testing karma-jasmine
How to write the unit testing for the file upload method in the Angular 7 (or 2+)

I'm trying to write the unit testing for the file upload method in the angular 7. Getting the below error in …

angular karma-jasmine angular-test
Angular 6: How to write jasmine test spec for a mat-dialog

I trying to write a test spec for mat-dialog, but i could not be success, the problem is that it …

angular karma-jasmine angular-unit-test
Error: No provider for InjectionToken USE_DEFAULT_LANG

I am new to angular 4 jasmine unit testing. Kindly help me to get full test coverage for my component attached. …

angular jasmine karma-jasmine karma-coverage angular4-router