Unit Testing Array functions indexOf, findIndex and filter Angular | Jasmine | Karma | Unit Test

Опубликовано: 30 Сентябрь 2024
на канале: Rudra Tech 2014
3,937
31

This video shows how to unit test following methods:
indexOf() - method returns the first index of a value in an array/string. If there is no match, the method returns -1.
findIndex() - method returns the index of the first element in the array that satisfies the provided testing function.
filter() - method returns a new array of all the values in an array that matches the conditions of a function. If there is no match, the method returns an empty array.




This video is made in response to the comment made by the user:
-------------------------------------------------------------------------------
K Bhargav •
Hi Rudra, Can you make video on - How to cover the findIndex, indexof, filter functions In angular Unit testing
-------------------------------------------------------------------------------