Jasmine Interview Questions
In this post we will look at Jasmine Interview questions. Examples are provided with explanation.
- What is Angular Unit Testing?
- What is Jasmine?
- What are the types of Matchers used in Jasmine?
- What is a Headless Browser?
- Name some Asymmetric Matchers in Jasmine?
- How can we disable tests in Jasmine?
- What is Jasmine Spy?
- How can we focus on a single Spec in Jasmine.js?
- How do we change the return value of Jasmine Spy?
What is Angular Unit Testing?
Angular Unit Testing is a testing used in testing individual components of the applications.It is performed by using Karma and Jasmine.Jasmine is used in writing the tests and Karma is used in running those tests.We can use Async and TestBed in testing Asynchronous Code, Components, Directives and Service easier.
What is Jasmine?
Jasmine is used as a testing tool for unit testing and is one of the most significant types of Automated Testing.It also comes to the web apps, in testing our plans consisting end-to-end testing, load, and user interface testing.What are the types of Matchers used in Jasmine?
Matchers used in Jasmine are as follows:toBeArray()
toBeArrayOfBooleans()
toBeFalse()
toBeCalculable()
toBeOddNumber()
toBeEmptyObject()
any.after(n)
What is a Headless Browser?
Headless Browser is used in providing computerized control of a web page in a popular web browser and is performed through CLI(Command Line Interface) or in managing network communication.It is also used for examining web pages as it renders and understands HTML and consists of components like Page Layout, Color, Font Selection and in executing JavaScript and AJAX.Name some Asymmetric Matchers in Jasmine?
Some of the Asymmetric Matchers in Jasmine are as follows:jasmine.any
jasmine.anything
jasmine.arrayContaining
jasmine.objectContaining
jasmine.stringMatching