nathanboktae/chai-dom

Support `text` and `attr` on NodeLists by passing an array

Open

#3 aberto em 30 de out. de 2015

Ver no GitHub
 (1 comment) (1 reaction) (0 assignees)JavaScript (24 forks)github user discovery
help wanted

Métricas do repositório

Stars
 (77 stars)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

For example

document.querySelectorAll('li').should.have.text(['red', 'blue', 'green'])
document.querySelectorAll('li').should.have.attr('aria-selected', ['', 'true', ''])

Having regex in there too would be nice, maybe something like the following?

document.querySelectorAll('.email').should.have.text(/[^@]+@.+/)
document.querySelectorAll('p').should.have.text([/^Welcome, .+\./, /^For the first step/])

Guia do colaborador