@@ -4,21 +4,21 @@ var expect = require('chai').expect
4
4
describe ( 'async-validate:' , function ( ) {
5
5
6
6
var descriptor = {
7
- mock : { type : 'method ' } ,
7
+ mock : { type : 'function ' } ,
8
8
}
9
9
10
10
it ( 'should error on value that is not a function' , function ( done ) {
11
11
var schema = new Schema ( descriptor ) ;
12
12
schema . validate ( { mock : 80 } , function ( err , res ) {
13
13
expect ( res . errors . length ) . to . eql ( 1 ) ;
14
- expect ( res . errors [ 0 ] . message ) . to . eql ( 'mock is not a method ' ) ;
14
+ expect ( res . errors [ 0 ] . message ) . to . eql ( 'mock is not a function ' ) ;
15
15
done ( ) ;
16
16
} ) ;
17
17
} ) ;
18
18
19
19
it ( 'should error on invalid arity (len: 1)' , function ( done ) {
20
20
var descriptor = {
21
- mock : { type : 'method ' , len : 1 } ,
21
+ mock : { type : 'function ' , len : 1 } ,
22
22
}
23
23
var schema = new Schema ( descriptor ) ;
24
24
schema . validate ( { mock : function ( ) { } } , function ( err , res ) {
@@ -32,7 +32,7 @@ describe('async-validate:', function() {
32
32
33
33
it ( 'should error on invalid arity (min: 1)' , function ( done ) {
34
34
var descriptor = {
35
- mock : { type : 'method ' , min : 1 } ,
35
+ mock : { type : 'function ' , min : 1 } ,
36
36
}
37
37
var schema = new Schema ( descriptor ) ;
38
38
schema . validate ( { mock : function ( ) { } } , function ( err , res ) {
@@ -45,7 +45,7 @@ describe('async-validate:', function() {
45
45
46
46
it ( 'should error on invalid arity (max: 0)' , function ( done ) {
47
47
var descriptor = {
48
- mock : { type : 'method ' , max : 0 } ,
48
+ mock : { type : 'function ' , max : 0 } ,
49
49
}
50
50
var schema = new Schema ( descriptor ) ;
51
51
schema . validate ( { mock : function ( foo ) { } } , function ( err , res ) {
@@ -58,7 +58,7 @@ describe('async-validate:', function() {
58
58
59
59
it ( 'should error on invalid arity (min: 0, max: 1)' , function ( done ) {
60
60
var descriptor = {
61
- mock : { type : 'method ' , min : 0 , max : 1 } ,
61
+ mock : { type : 'function ' , min : 0 , max : 1 } ,
62
62
}
63
63
var schema = new Schema ( descriptor ) ;
64
64
schema . validate ( { mock : function ( foo , bar ) { } } , function ( err , res ) {
@@ -69,7 +69,6 @@ describe('async-validate:', function() {
69
69
} ) ;
70
70
} ) ;
71
71
72
-
73
72
it ( 'should validate function type' , function ( done ) {
74
73
var schema = new Schema ( descriptor ) ;
75
74
schema . validate ( { mock : function ( ) { } } , function ( err , res ) {
0 commit comments