@@ -105,7 +105,7 @@ describe( 'Mixed Types ', function(){
105105 } )
106106
107107 it ( 'exclusive tests should throw without a name' , function ( ) {
108- ; ( function ( ) {
108+ ( function ( ) {
109109 mixed ( ) . test ( { message : 'invalid' , exclusive : true , test : function ( ) { } } )
110110 } ) . should . throw ( )
111111 } )
@@ -133,7 +133,7 @@ describe( 'Mixed Types ', function(){
133133 message : 'invalid' ,
134134 exclusive : true ,
135135 name : 'max' ,
136- test : function ( v , path , context ) {
136+ test : function ( ) {
137137 this . path . should . equal ( 'test' )
138138 this . parent . should . eql ( { other : 5 , test : 'hi' } )
139139 this . options . context . should . eql ( { user : 'jason' } )
@@ -149,7 +149,7 @@ describe( 'Mixed Types ', function(){
149149 var inst = mixed ( ) . test ( {
150150 message : 'invalid ${path}' ,
151151 name : 'max' ,
152- test : function ( v ) {
152+ test : function ( ) {
153153 return this . createError ( { path : 'my.path' } )
154154 }
155155 } )
@@ -166,7 +166,7 @@ describe( 'Mixed Types ', function(){
166166 var inst = mixed ( ) . test ( {
167167 message : 'invalid ${path}' ,
168168 name : 'max' ,
169- test : function ( v ) {
169+ test : function ( ) {
170170 return this . createError ( { message : '${path} nope!' , path : 'my.path' } )
171171 }
172172 } )
@@ -254,13 +254,22 @@ describe( 'Mixed Types ', function(){
254254 } )
255255
256256 it ( 'concat should fail on different types' , function ( ) {
257- var inst = string ( ) . default ( 'hi' )
257+ var inst = string ( ) . default ( 'hi' ) ;
258258
259- ; ( function ( ) {
259+ ( function ( ) {
260260 inst . concat ( object ( ) )
261261 } ) . should . throw ( TypeError )
262262 } )
263263
264+ it ( 'concat should allow mixed and other type' , function ( ) {
265+ var inst = mixed ( ) . default ( 'hi' ) ;
266+
267+ ( function ( ) {
268+ inst . concat ( string ( ) ) . _type . should . equal ( 'string' )
269+
270+ } ) . should . not . throw ( TypeError )
271+ } )
272+
264273 it ( 'concat should maintain undefined defaults' , function ( ) {
265274 var inst = string ( ) . default ( 'hi' )
266275
@@ -285,7 +294,7 @@ describe( 'Mixed Types ', function(){
285294 //parent
286295 inst . _validate ( undefined , { } , { parent : { prop : 5 } } ) . should . be . rejected ,
287296 inst . _validate ( undefined , { } , { parent : { prop : 1 } } ) . should . be . fulfilled ,
288- inst . _validate ( 'hello' , { } , { parent : { prop : 5 } } ) . should . be . fulfilled ,
297+ inst . _validate ( 'hello' , { } , { parent : { prop : 5 } } ) . should . be . fulfilled
289298 ] )
290299 . then ( function ( ) {
291300
@@ -336,6 +345,3 @@ describe( 'Mixed Types ', function(){
336345 } )
337346
338347} )
339-
340-
341-
0 commit comments