Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create test case for DOM NodeList #3

Open
felquis opened this issue Apr 23, 2016 · 1 comment
Open

Create test case for DOM NodeList #3

felquis opened this issue Apr 23, 2016 · 1 comment

Comments

@felquis
Copy link
Contributor

felquis commented Apr 23, 2016

var fragment = document.createDocumentFragment()
fragment.appendChild(document.createElement('div'))
fragment.appendChild(document.createElement('div'))
fragment.appendChild(document.createElement('div'))

var elements = fragment.querySelectorAll('div')

Then we need to iterate the divs

each(elements, function (elem) {
  elem.classList.add('active')
})

Test if the fragment.querySelectorAll('.active') is equal 3

or something like that

@rands0n
Copy link
Contributor

rands0n commented Apr 26, 2016

I think we need a mock to do this! :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants