javascript - How to use jasmine toMatch multiple arguments? -


how can test if variable match multiple options in jasmine? want this, checking if taxonomytype matches 1 of 3 options 'gem', 'pager' or 'atc58':

expect(taxonomytype).tomatch({'gem', 'pager', 'atc58'}); 

you reverse , use tocontain

var = ['gem', 'pager', 'atc58'];   expect(a).tocontain(taxonomytype); 

or write own loop (or use lodash/underscore) determine "found" , compare result true/false

expect(_.includes(['gem', 'pager', 'atc58'], taxonomytype)).tobe(true); 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -