I have a test like:
const myText = 'This is my test';
expect(myText, contains('This'));
expect(myText, contains('test'));
How can I combine those 2 matchers to have only 1 expect ?
I have a test like:
const myText = 'This is my test';
expect(myText, contains('This'));
expect(myText, contains('test'));
How can I combine those 2 matchers to have only 1 expect ?
Copyright © 2021 Jogjafile Inc.
You can combine the matchers with
allOf:More generally, you can combine any matchers using:
allOfas a logical&.anyOfas a logical||.isNotas a logical!.