# Category: unit-testing

## DELETE request: Error: Expected one matching request for criteria "Match URL: /api/accounts/Acc444", found none. though API exist

I am writing unit test for angular app, I want to check if ‘DELETE’ API (this will delete account) is

## Not able to increase code coverage in Angular Unit testing

I am trying to learn how to make unit testing for Angular with Karma and Jasmine. My problem is that

## Angular Material Datepicker karma jasmine unit testing giving error Cannot read property ‘subscribe’ of undefined

I’m trying to write unit tests for component, which has Angular Material Datepicker, but I’m getting this error: TypeError: Cannot

## Testing Angular Material elements with mocha

I would like to test that my HTML layout is sound. I understand how to properly test components and services,

## Controller’s scope is undefined after compiling a directive with \$compile

I’m writing an unit test for this directive: .directive(‘readOnlyExplorer’, () => ({ templateUrl: ‘components/experiment-explorer/read-only-explorer.template.html’, restrict: ‘E’, controller: ‘ReadOnlyExplorerController’, controllerAs: ‘vm’,

## How to test getElementsByClassName method with unit-testing?

I want to test a function which add a classname to a div container when there are more than 7

## How to spyOn a property called in a function?

I need to spyOn the ‘offsetWidth’ because the value is now undefined. getCurrentPage is a function which get the element

## how to write test case for searchFilter data in angular material

How to write test case for below code this is code applyFilter(filterValue: string) { console.log(“filter data”+filterValue) this.dataSource.filter = filterValue.trim().toLocaleLowerCase(); if