Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 829 Bytes

hasStyle.md

File metadata and controls

24 lines (17 loc) · 829 Bytes

hasStyle(style, value)

⚠Cette page est actuellement en cours de traduction française. Vous pouvez repasser plus tard ou participer à la traduction de celle-ci dès maintenant !

Assert every `Wrapper` in `WrapperArray` DOM node has style matching value.

Returns true if Wrapper DOM node has style matching value.

Note will only detect inline styles when running in jsdom.

  • Arguments:

    • {string} style
    • {string} value
  • Returns: {boolean}

  • Example:

import { mount } from 'vue-test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const wrapper = mount(Foo)
const divArray = wrapper.findAll('div')
expect(divArray.hasStyle('color', 'red')).toBe(true)