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

mysql - FireDac error 314 - but DLLs are in program directory -

git - How to list all releases of public repository with GitHub API V3 -

c++ - Getting C2512 "no default constructor" for `ClassA` error on the first parentheses of constructor for `ClassB`? -