$(document).ready(function(){
	// hack for html validator (ol cannot be empty)
	$('li').remove();
	
	var elem;
	
	test("Basic element creation", function() {
		var elem = $.create('div');
		same(elem.get(0).tagName, "DIV", "We expect DIV element to be created");
	});
	
	test("Attributes", function() {
		elem = $.create('div', {id: 'myId'});
		same(elem.attr('id'), "myId", "(Single attribute) We expect element's identifier of myId");
		elem = $.create('div', {id: 'myId', name: 'myName'});
		same(elem.attr('id'), "myId", "(Multiple attributes) We expect element's identifier of myId");
		same(elem.attr('name'), "myName", "(Multiple attributes) We expect element's name of myName");
		elem = $.create('div', 'id: myId');
		ok(elem.attr('id') === "", "We expect malformed attributes parameter to be ignored");
	});
	
	test("Children", function() {
		elem = $.create('div', null, 'myText');
		same(elem.text(), "myText", "We expect element's text to be set to myText");
		elem = $.create('div', null, $.create('p'));
		same(elem.children().get(0).tagName, "P", "(Single child) We expect element to have P child element");
		elem = $.create('div', null, [$.create('p'), $.create('span')]);
		same(elem.children('p').get(0).tagName, "P", "(Multiple child) We expect element to have P child element");
		same(elem.children('span').get(0).tagName, "SPAN", "(Multiple child) We expect element to have SPAN child element");
		elem = $.create('div', null, {one: $.create('p'), two: $.create('span')});
		ok(elem.children().length === 0, "We expect malformed children parameter to be ignored (object)");
		elem = $.create('div', null, 1);
		ok(elem.children().length === 0, "We expect malformed children parameter to be ignored (int)");
	});
	
	test("Root element", function() {
		var iFrame = $.create('iframe', {id: 'myIframe'}).insertAfter('#main');
		elem = $.create('div', null, null, $('iframe').get(0).contentDocument);
		same(elem.get(0).tagName, "DIV", "We expect DIV element to be created");
		$('iframe#myIframe').remove();
	});
});
@@ -1,8 +1,51 @@
+/*global $,document,module,test,ok,same*/%0D%0A
 $(docume
@@ -62,18 +62,20 @@
 function
+ 
 ()
+ 
 %7B%0D%0A%09// h
@@ -189,32 +189,33 @@
 ation%22, function
+ 
 () %7B%0D%0A%09%09var elem
@@ -316,24 +316,24 @@
 ;%0D%0A%09%7D);%0D%0A%09%0D%0A
-
 %09test(%22Attri
@@ -340,32 +340,33 @@
 butes%22, function
+ 
 () %7B%0D%0A%09%09elem = $
@@ -899,32 +899,33 @@
 ldren%22, function
+ 
 () %7B%0D%0A%09%09elem = $
@@ -1844,16 +1844,17 @@
 function
+ 
 () %7B%0D%0A%09%09

test updates