jest expect to be array of strings code example
Example: jest check array of string
const fruits = ['apple', 'cat'];
test('should have array of string', () => {
expect(fruits).toEqual(
expect.arrayContaining([expect.any(String)])
);
});
const fruits = ['apple', 'cat'];
test('should have array of string', () => {
expect(fruits).toEqual(
expect.arrayContaining([expect.any(String)])
);
});