我有一个数组:
Const domesticAnimals = ['Chicken','lama','Donkey']
Const wildAnimals =['lama','lion','elephant']
Run Code Online (Sandbox Code Playgroud)
如何测试数组wildAnimals 中是否列出了任何内容domesticAnimals?
我努力了
test('test If any wild animal is in the domestic animal list', async() =>{
expect(domesticAnimals ).toContain('lama')
}) //works perfectly
test('test If any wild animal is in the domestic animal list', async() =>{
expect(domesticAnimals ).toContain(wildAnimals) // does not work
})
Run Code Online (Sandbox Code Playgroud)