File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 13
13
"hoek" : " 6.x.x"
14
14
},
15
15
"devDependencies" : {
16
- "lab" : " 17 .x.x" ,
16
+ "lab" : " 18 .x.x" ,
17
17
"markdown-toc" : " 1.1.x"
18
18
},
19
19
"scripts" : {
Original file line number Diff line number Diff line change @@ -1219,6 +1219,21 @@ describe('expect()', () => {
1219
1219
Hoek . assert ( exception . at . line !== Code . thrownAt ( failed ) . line , 'Reports the wrong line number' ) ;
1220
1220
Hoek . assert ( exception . at . filename === __filename , `expected ${ exception . at . filename } to equal ${ __filename } ` ) ;
1221
1221
} ) ;
1222
+
1223
+ it ( 'validates assertion (error)' , ( ) => {
1224
+
1225
+ try {
1226
+ Code . expect ( { } ) . to . not . exist ( ) ;
1227
+ }
1228
+ catch ( err ) {
1229
+ var exception = err ;
1230
+ }
1231
+
1232
+ Hoek . assert ( exception . message === 'Expected {} to not exist' , exception ) ;
1233
+ Hoek . assert ( exception . actual === undefined , exception ) ;
1234
+ Hoek . assert ( exception . expected === undefined , exception ) ;
1235
+ Hoek . assert ( exception . at . filename === __filename , `expected ${ exception . at . filename } to equal ${ __filename } ` ) ;
1236
+ } ) ;
1222
1237
} ) ;
1223
1238
1224
1239
describe ( 'empty()' , ( ) => {
You can’t perform that action at this time.
0 commit comments