You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

16 lines
419 B

describe('indexof', function () {
var indexof = require('indexof')
, assert = require('component-assert');
it('handles arrays', function () {
var array = ['a', 'b', 'c'];
assert(2 == indexof(array, 'c'));
});
it('handles node lists', function () {
var ul = document.querySelector('ul');
var lis = ul.querySelectorAll('li');
var li = lis[2];
assert(2 == indexof(lis, li));
});
});