问题
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
回答1:
expect(variable1 == 1 && variable2 == 2).toBeTruthy();
来源:https://stackoverflow.com/questions/17469928/how-to-use-multiple-expect-in-jasmine