Testing Conditional Data Binding in Angular

I have the following code:

<div class="myClass">
    
</div>

I want to be able to unit test this specific element in my HTML so that when the function myFunction(a) fails, I can ensure that the text is Name not given.

Any ideas on how I can accomplish this using Jasmine?

Thanks

Source: AngularJS



from Angular Questions https://angularquestions.com/2017/10/13/testing-conditional-data-binding-in-angular/
via @lzomedia #developer #freelance #web #lzomedia.com

Comments

Popular posts from this blog

ng-show doesn’t work correct with value boolean

Using PHP and MySQL data to generate PDF letters like in MS Word mailmerge functionality - development

ng-include of inline SVG does not display gradient except in Chrome