Ancient
Ancient

Reputation: 3057

How to use multiple expect in jasmine

I am using jasmine with jasmine-species . I am making a test of search in my site . In search there are multiple criteria a user can select . I want to know that how to expect with multiple 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 expects into single expect . Is this possible in jasmine ? if yes , then how ?

Thanks in advance

Upvotes: 10

Views: 11410

Answers (1)

aaa
aaa

Reputation: 1124

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

Upvotes: 24

Related Questions