I have a string array names which gets dynamically filled with the names from a dataset. Three names in this array are always the same even though the dataset is changed. So, in my spec I want to check if the names array contains these three specific names. But the matchers aren't helping me in Jasmine.
Example:
names = ["a", "b", "c", "d", "e", "f", "g"];
expect(names).toContain("b","d","c"); // this should return true as b, d, and c are in the names array
The above expect statement doesn't work. Is there a way to use toMatch and use a regex to solve this problem?
Could anyone help me out with this.
Thank you.