135
rated 0 times
[
138]
[
3]
/ answers: 1 / hits: 57802
/ 5 Years ago, tue, september 17, 2019, 12:00:00
I would like to check if a string contains 'abc' or 'cde' with jest.
const substr1 = 'abc'
const substr2 = 'cde'
const str = 'ooocdeooo'
I am using
expect(str).toContain(substr1);
for one string but I cant find a clean way to check whether substr1 or substr2 is in str
How could I do that ?
Thanks !
More From » jestjs