var husl = require('../husl');
var expect = require('chai').expect;

var black = "#000000",
    grey = "#777777",
    white = "#FFFFFF",
    red = "#FF0000",
    green = "#00FF00",
    blue = "#0000FF";

describe('HuSL', function () {
	it('hue order', function () {
		expect(husl.fromHex(red)[0]).to.be.below(husl.fromHex(green)[0]);
		expect(husl.fromHex(green)[0]).to.be.below(husl.fromHex(blue)[0]);
	});
	it('saturation order', function () {
		expect(husl.fromHex(grey)[1]).to.be.below(husl.fromHex(red)[1]);
	});
	it('lightness order', function () {
		expect(husl.fromHex(black)[2]).to.be.below(husl.fromHex(grey)[2]);
		expect(husl.fromHex(grey)[2]).to.be.below(husl.fromHex(white)[2]);
		expect(husl.fromHex(blue)[2]).to.be.below(husl.fromHex(red)[2]);
		expect(husl.fromHex(red)[2]).to.be.below(husl.fromHex(green)[2]);
	});
});

@@ -62,16 +62,109 @@
 xpect;%0A%0A
+var comp = %5B%5D;%0Afor (var i = 0; i %3C 16; i++) %7B%0A%09var h = i.toString(16);%0A%09comp.push(h + h);%0A%7D%0A%0A
 var blac
@@ -919,12 +919,257 @@
 );%0A%09%7D);%0A
+%09it('saturation upper bound', function () %7B%0A%09%09comp.forEach(function (r) %7B%0A%09%09%09comp.forEach(function (g) %7B%0A%09%09%09%09comp.forEach(function (b) %7B%0A%09%09%09%09%09var c = husl.fromHex(%22#%22 + r + g + b);%0A%09%09%09%09%09expect(c%5B1%5D).to.be.below(100.1);%0A%09%09%09%09%7D);%0A%09%09%09%7D);%0A%09%09%7D);%0A%09%7D);%0A
 %7D);%0A

Add test for saturation upper bound