Slide 26
Slide 26 text
ARRAYS
🧱
ARRAYS
🧱
test('list three fruits', () => {
const expectedFruits = ['banana', 'mango', 'watermelon']
expect(expectedFruits[0]).toEqual('banana')
expect(expectedFruits[1]).toEqual('mango')
expect(expectedFruits[2]).toEqual('watermalo')
})
test('list three fruits', () => {
const expectedFruits = ['banana', 'mango', 'watermelon']
const actualFruits = () => ['banana', 'mango', 'watermelon']
expect(expectedFruits).toEqual(
expect.arrayContaining(actualFruits)
)
})
10
.
1