Skip to content

Instantly share code, notes, and snippets.

@tjstebbing
Created September 26, 2015 08:46
Show Gist options
  • Save tjstebbing/1c0d8ea15a2878db50b8 to your computer and use it in GitHub Desktop.
Save tjstebbing/1c0d8ea15a2878db50b8 to your computer and use it in GitHub Desktop.
<div>
<div class='list'>
<div class='item'>abc</div>
<div class='item'>abc</div>
<div class='item'>abc</div>
<div class='item'>abc</div>
</div>
<img src='http://google.com/logo.png'/>
</div>
//feryt asserts facts about the DOM
var feryt = require('feryt');
feryt(node).find('.list').count('.item', 4);
feryt(node).find('.list').each('.item', function(n) {
n.content('abc');
});
feryt(node).find('img').attr({src : 'http://google.com/logo.png'});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment