@@ -43,7 +43,7 @@ test('throw error if options are empty', (t) => {
43
43
t . throws ( ( ) => utils . verify ( { } ) , Error )
44
44
} )
45
45
46
- test ( 'throw error if options are invalid – client. realmUrl' , ( t ) => {
46
+ test ( 'throw error if options are invalid – realmUrl' , ( t ) => {
47
47
const invalids = [
48
48
null ,
49
49
undefined ,
@@ -63,11 +63,11 @@ test('throw error if options are invalid – client.realmUrl', (t) => {
63
63
invalids . forEach ( ( invalid ) => {
64
64
t . throws ( ( ) => utils . verify ( helpers . getOptions ( {
65
65
realmUrl : invalid
66
- } ) ) , Error )
66
+ } ) ) , Error , helpers . log ( 'realmUrl' , invalid ) )
67
67
} )
68
68
} )
69
69
70
- test ( 'throw error if options are invalid – client. clientId' , ( t ) => {
70
+ test ( 'throw error if options are invalid – clientId' , ( t ) => {
71
71
const invalids = [
72
72
null ,
73
73
undefined ,
@@ -86,11 +86,11 @@ test('throw error if options are invalid – client.clientId', (t) => {
86
86
invalids . forEach ( ( invalid ) => {
87
87
t . throws ( ( ) => utils . verify ( helpers . getOptions ( {
88
88
clientId : invalid
89
- } ) ) , Error )
89
+ } ) ) , Error , helpers . log ( 'clientId' , invalid ) )
90
90
} )
91
91
} )
92
92
93
- test ( 'throw error if options are invalid – client. secret' , ( t ) => {
93
+ test ( 'throw error if options are invalid – secret' , ( t ) => {
94
94
const invalids = [
95
95
null ,
96
96
undefined ,
@@ -109,7 +109,7 @@ test('throw error if options are invalid – client.secret', (t) => {
109
109
invalids . forEach ( ( invalid ) => {
110
110
t . throws ( ( ) => utils . verify ( helpers . getOptions ( {
111
111
secret : invalid
112
- } ) ) , Error )
112
+ } ) ) , Error , helpers . log ( 'secret' , invalid ) )
113
113
} )
114
114
} )
115
115
@@ -128,7 +128,7 @@ test('throw error if options are invalid – cache', (t) => {
128
128
invalids . forEach ( ( invalid ) => {
129
129
t . throws ( ( ) => utils . verify ( helpers . getOptions ( {
130
130
cache : invalid
131
- } ) ) , Error )
131
+ } ) ) , Error , helpers . log ( 'cache' , invalid ) )
132
132
} )
133
133
} )
134
134
@@ -160,7 +160,7 @@ test('throw error if options are invalid – userInfo', (t) => {
160
160
invalids . forEach ( ( invalid ) => {
161
161
t . throws ( ( ) => utils . verify ( helpers . getOptions ( {
162
162
userInfo : invalid
163
- } ) ) , Error )
163
+ } ) ) , Error , helpers . log ( 'userInfo' , invalid ) )
164
164
} )
165
165
} )
166
166
@@ -178,6 +178,8 @@ test('throw no error if options are valid', (t) => {
178
178
t . plan ( valids . length )
179
179
180
180
valids . forEach ( ( valid ) => {
181
- t . notThrows ( ( ) => utils . verify ( helpers . getOptions ( valid ) ) , Error )
181
+ t . notThrows (
182
+ ( ) => utils . verify ( helpers . getOptions ( valid ) ) ,
183
+ Error , helpers . log ( 'valid' , valid ) )
182
184
} )
183
185
} )
0 commit comments