Top "Karma-jasmine" questions

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

Test a function that contains a setTimeout()

I have a close function in my component that contains a setTimeout() in order to give time for the animation …

angular testing jasmine settimeout karma-jasmine
Can't bind to 'matMenuTriggerFor' since it isn't a known property of 'button'

I'm getting following error when I try to test an angular component: Error while running jest tests: Can't bind to …

angular angular-material karma-jasmine jestjs
Angular 2 Testing - Async function call - when to use

When do you use the async function in the TestBed when testing in Angular 2? When do you use this? beforeEach(() =&…

angular unit-testing karma-jasmine angular2-testing angular-test
Testing Angular component with unsubscribe Error during cleanup of component

I'm testing a component which subscribe router params. Every test pass and everything works fine. But if I look in …

angular typescript karma-runner karma-jasmine
How do I exclude files from karma code coverage report?

Is there a way to exclude files from code coverage report for the karma coverage runner https://github.com/karma-runner/…

karma-runner karma-jasmine karma-coverage
What does npm mean by 'Skipping failed optional dependency'?

Latest version of node and npm causing problems in running karma. When I try to install karma-cli npm i -g …

node.js npm gulp karma-jasmine gulp-karma
ReferenceError: Can't find variable: module in angular testing

I'm trying to write a test for my Angular controller, I'm using jasmine karma and angular-mocks, but keeps on getting …

javascript angularjs testing ionic-framework karma-jasmine
MatDialog Service Unit Test Angular 6 Error

I'm having modal service to open, confirm and close dialog and i am making its unit test file but i …

javascript angular unit-testing jasmine karma-jasmine
How to get Jasmine's spyOnProperty to work?

I saw this post post and was excited to try it out, but I'm unable to get it working. Trying …

javascript angular unit-testing jasmine karma-jasmine
Unit Testing/mocking Window properties in Angular2 (TypeScript)

I'm building some unit tests for a service in Angular2. Within my Service I have the following code: var hash: …

unit-testing typescript angular phantomjs karma-jasmine