Permalink
Browse files

Adding a test for issue #60

  • Loading branch information...
filmaj committed Nov 18, 2011
1 parent f9556c5 commit 41e4dd0a863f9dd1770ac3514f1f43cd205994a1
Showing with 3 additions and 1 deletion.
  1. +3 −1 spec/tests/core-tests.js
View
@@ -54,14 +54,16 @@ CoreTests.prototype.run = function () {
equals(x[x.length - 1].innerHTML, 'this is item three', 'Should have text as specified in markup');
});
test('Element(s) reference selector', function() {
- expect(3);
+ expect(4);
var el = document.getElementById("item_1"),
x = x$(el);
equals(x.length, 1, 'Should return array with one element');
equals(x[0].innerHTML, 'this is item one', 'Should have proper text as defined in page markup');
var formEls = document.getElementById('form_1').elements;
x = x$(formEls);
equals(x.length, 2, 'Should return proper number of elements when passing in a HTMLCollection object')
+ x = x$(window);
+ equals(x[0], window, 'Should be able to reference the `window` object through xui');
});
test('Tag name selector', function() {
expect(2);

0 comments on commit 41e4dd0

Please sign in to comment.