How to use multiple expectations in jasmine

I use jasmine with jasmine-species . I am doing a search check on my site. There are several criteria in the search that the user can select. I want to know what to expect from several criteria.

Suppose this is my case

 expect(variable1).toEqual(''); expect(variable2).toEqual(''); expect(variable3).toEqual(''); expect(variable4).toEqual(''); 

My question is that I want to move all expectations to a single expected. Is this possible in jasmine? if so, how?

Thank you in advance

+4
source share
1 answer

expect (variable1 == 1 && variable2 == 2) .toBeTruthy ();

+7
source

Source: https://habr.com/ru/post/1489700/


All Articles