Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 595 Bytes

hasStyle.md

File metadata and controls

24 lines (16 loc) · 595 Bytes

hasStyle(style, value)

Asserte que le DOM du Wrapper contient un style avec une certaine valeur.

Retourne true si le nœud du DOM du Wrapper contient un style correspondant à string.

Note : cela va uniquement détecter les styles inlines quand ils fonctionnent avec jsdom.

  • Paramètres :

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

  • Exemple :

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)