Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 502 Bytes

File metadata and controls

20 lines (14 loc) · 502 Bytes

at(index)

渡された indexWrapper を返します。ゼロベースの番号付けを使用します(つまり、最初のアイテムはインデックス 0 になります)。

  • 引数:

    • {number} index
  • 戻り値: {Wrapper}

  • 例:

import { shallowMount } from '@vue/test-utils'
import Foo from './Foo.vue'

const wrapper = shallowMount(Foo)
const divArray = wrapper.findAll('div')
const secondDiv = divArray.at(1)
expect(secondDiv.is('p')).toBe(true)