Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 504 Bytes

hasStyle.md

File metadata and controls

24 lines (16 loc) · 504 Bytes

hasStyle(style, value)

Assert Wrapper DOM node has style matching value

Returns true if Wrapper DOM node has style matching string.

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)
expect(wrapper.hasStyle('color', 'red')).toBe(true)