How to define a spec in jasmine?



How to define a spec in jasmine?..

Answer / Kaushlendra Kumar

In Jasmine, you define a spec by creating a JavaScript function that describes the behavior of your code. Each spec should contain one or more expectations that describe the expected outcome of running your code. You can use Jasmine's built-in matchers (e.g., expect(), toEqual(), etc.) to compare the actual result with the expected result.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

Do I need angular?

1 Answers  


What are the key features of angular.js?

1 Answers  


Explain bootstrapping in angularjs?

1 Answers  


In angular what is string interpolation?

1 Answers  


What is stackblitz?

1 Answers  


What is rxjs?

1 Answers  


What is export array in angular 2?

1 Answers  


What are zones? What is ngzone? What is change detection? What is ngzone run outside?

1 Answers  


What is angular base elements?

1 Answers  


What is activatedroute?

1 Answers  


What is angular 2 and typescript?

1 Answers  


Explain class and inheritance in js?

1 Answers  


Categories