Skip to content

Files

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Latest commit

Oct 20, 2017
810e184 · Oct 20, 2017

History

History
24 lines (17 loc) · 675 Bytes

hasStyle.md

File metadata and controls

24 lines (17 loc) · 675 Bytes

hasStyle(style, value)

Asserte que chaque Wrapper de WrapperArray a un nœud DOM ayant un certain style avec une certaine valeur.

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

Note : cela va uniquement détecter les styles inlines quand il fonctionne avec jsdom.

  • Paramètres :

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

  • Exemple :

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)