
# describe "Type", ->

# 	{ Type
# 		ArrayOf
# 		ObjectOf
# 		Required
# 		Any
# 		Void
# 		Null
# 		Undefined } = require "./../../js/index"

# 	describe ".validate()", ->

# 		it "expects properties with required types to have values", ->
# 			try
# 				Type.validate
# 					types:
# 						name: Required String
# 					target:
# 						eyeColor: "#3052ff"
# 			catch error
# 				expect(error).not.toBeNull()

# 		it "expects properties with typed array literals to have the correct value types", ->
# 			try
# 				Type.validate
# 					types:
# 						friends: ArrayOf String
# 					target:
# 						friends: ["hello", "world", false]
# 			catch error
# 				expect(error).not.toBeNull()	

# 		it "expects properties with typed object literals to have the correct value types", ->
# 			try
# 				Type.validate
# 					types:
# 						props: ObjectOf Array
# 					target:
# 						props:
# 							files: []
# 							dest: "build"
# 			catch error
# 				expect(error).not.toBeNull()

# 		it "expects properties with any type to allow any value type", ->
# 			try
# 				Type.validate
# 					types:
# 						a: Any
# 						b: Any
# 						c: Any
# 					target:
# 						a: {}
# 						b: 2
# 						c: "hello"
# 			catch error
# 				expect(error).toBeNull()

# 	A = Type {}
# 	B = Type { kind: A }
# 	C = Type { kind: B }

# 	describe ".kind()", ->

# 		it "returns the kindtype of the passed value", ->
# 			expect Type.kind C
# 				.toBe B
# 			expect Type.kind B
# 				.toBe A
# 			expect Type.kind A
# 				.toBe Object

# 		it "handles values too", ->
# 			expect Type.kind new C
# 				.toBe B

# 		it "returns undefined when Object is passed", ->
# 			expect Type.kind Object
# 				.toBe undefined

# 	describe ".is()", ->

# 		it "returns whether the given value's type is any of the given types", ->
# 			expect Type.is {}, Object
# 				.toBe true
# 			expect Type.is 5, Number
# 				.toBe true

# 		it "returns whether the given type is any of the other given types", ->
# 			expect Type.is Function, Undefined, Object, Function
# 				.toBe true

# 	describe ".inherits()", ->

# 		it "returns whether the given value's type inherits from any of the given types", ->
# 			expect Type.inherits new C, A
# 				.toBe true
# 			expect Type.inherits new A, C
# 				.toBe false

# 		it "returns true if the given value's type is the same as any of the given types", ->
# 			expect Type.inherits new B, B, RegExp, Date
# 				.toBe true

# 		it "returns whether the given type inherits from any of the other given types", ->
# 			expect Type.inherits C, A
# 				.toBe true

# 	describe ".extends()", ->

# 		it "returns whether the given value's kindtype is the same as any of the given types", ->
# 			expect Type.extends new C, B, RegExp, Date
# 				.toBe true
# 			expect Type.extends C, Object, Number, String
# 				.toBe false

# 		it "returns false if the kindtype is further up the prototype chain", ->
# 			expect Type.extends new C, A
# 				.toBe false

# 	describe ".isConstructor()", ->

# 		it "returns whether the given value is a constructor", ->
# 			expect Type.isConstructor A
# 				.toBe true
# 			expect Type.isConstructor {}
# 				.toBe false
