How to use multiple expect in jasmine

僤鯓⒐⒋嵵緔 提交于 2020-01-03 16:36:18

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!