@@ -123,6 +123,14 @@ describe('number', () => {
123123
124124 describe ( 'greater()' , ( ) => {
125125
126+ it ( 'throws when limit is undefined' , ( ) => {
127+
128+ expect ( ( ) => {
129+
130+ Joi . number ( ) . greater ( ) ;
131+ } ) . to . throw ( 'limit is required' ) ;
132+ } ) ;
133+
126134 it ( 'throws when limit is not a number' , ( ) => {
127135
128136 expect ( ( ) => {
@@ -245,6 +253,14 @@ describe('number', () => {
245253
246254 describe ( 'less()' , ( ) => {
247255
256+ it ( 'throws when limit is undefined' , ( ) => {
257+
258+ expect ( ( ) => {
259+
260+ Joi . number ( ) . less ( ) ;
261+ } ) . to . throw ( 'limit is required' ) ;
262+ } ) ;
263+
248264 it ( 'throws when limit is not a number' , ( ) => {
249265
250266 expect ( ( ) => {
@@ -379,6 +395,14 @@ describe('number', () => {
379395
380396 describe ( 'max()' , ( ) => {
381397
398+ it ( 'throws when limit is undefined' , ( ) => {
399+
400+ expect ( ( ) => {
401+
402+ Joi . number ( ) . max ( ) ;
403+ } ) . to . throw ( 'limit is required' ) ;
404+ } ) ;
405+
382406 it ( 'throws when limit is not a number' , ( ) => {
383407
384408 expect ( ( ) => {
@@ -498,6 +522,11 @@ describe('number', () => {
498522
499523 describe ( 'min()' , ( ) => {
500524
525+ it ( 'throws when limit is undefined' , ( ) => {
526+
527+ expect ( ( ) => Joi . number ( ) . min ( ) ) . to . throw ( 'limit is required' ) ;
528+ } ) ;
529+
501530 it ( 'throws when limit is not a number' , ( ) => {
502531
503532 expect ( ( ) => Joi . number ( ) . min ( 'a' ) ) . to . throw ( 'limit must be a number or reference' ) ;
@@ -660,6 +689,14 @@ describe('number', () => {
660689
661690 describe ( 'multiple()' , ( ) => {
662691
692+ it ( 'throws when base is undefined' , ( ) => {
693+
694+ expect ( ( ) => {
695+
696+ Joi . number ( ) . multiple ( ) ;
697+ } ) . to . throw ( 'base is required' ) ;
698+ } ) ;
699+
663700 it ( 'throws when multiple is not a number' , ( ) => {
664701
665702 expect ( ( ) => {
0 commit comments