var tests = function() {
	var wrapper = document.getElementById("Flow");

	// Flow.Utils
	describe('white space removal (Flow.Utils.stripWhitespace)', {
		'should strip white space from DOM tree' : function() {
			var stripped = document._createElement("div");
			stripped.appendChild(document.createTextNode("\n"));
			stripped.appendChild(document._createElement("p"));
			Flow.Utils.stripWhitespace(stripped);
			value_of(/\n/g.test(stripped.innerHTML)).should_be_false();
		}
	});

	describe('array modification (Flow.Utils.liveNodeList)', {
		'should return static node list' : function() {
			var nodes = wrapper._getElementsByTagName("*");

			expect(nodes.forEach).should_be(undefined);
		},
		
		'should return iterative node list' : function() {
			var nodes = wrapper._getElementsByTagName("*");
			nodes = Flow.Utils.liveNodeList(nodes);

			expect(nodes.forEach).should_not_be(undefined);
		}
	});

	describe('string casing (Flow.Utils.toCamelCase)', {
		'should change dashed string to camel case' : function() {
			var dashed = "margin-top";
			dashed = Flow.Utils.toCamelCase(dashed);
			expect(dashed).should_be("marginTop");
		}
	});

	describe('array filtering (Array Extras)', {
		'should assert each value is higher than 10' : function() {
			var isBigEnough = function(element, index, array) {
				return (element >= 10);
			};
			var passed = [12, 54, 18, 130, 44].every(isBigEnough); // passed is true
			
			expect(passed).should_be_true();
		},
		
		'should fail every assertion' : function() {
			var isBigEnough = function(element, index, array) {
				return (element >= 10);
			};
			var passed = [12, 5, 8, 130, 44].every(isBigEnough); // passed is false
			
			expect(passed).should_be_false();
		},
		
		'should assert some values are higher than 10' : function() {
			var isBigEnough = function(element, index, array) {
				return (element >= 10);
			};
			var passed = [12, 5, 8, 1, 4].some(isBigEnough); // passed is true
			
			expect(passed).should_be_true();
		},
		
		'should fail some assertion' : function() {
			var isBigEnough = function(element, index, array) {
				return (element >= 10);
			};
			var passed = [2, 5, 8, 1, 4].some(isBigEnough); // passed is false
			
			expect(passed).should_be_false();
		},
		
		'should return array of 3 numbers' : function() {
			var array = [1, 1, 1, 3, 3];

			array = array.filter(function(e) {
				return e == 1;
			});

			expect(array.length).should_be(3);
			expect(array).should_be([1, 1, 1]);
		}
	});
}();
