Jest matcher to match any one of three values

In order to one among the expected value, you can reverse the comparison and test it using toContain method like

expect(addFeedForm.state().feedfrequency).toEqual('');
addFeedForm.simulate('change');
expect([6, 12, 24]).toContain(addFeedForm.state().feedfrequency) 

Leave a Comment