Skip to content

Commit 0fc756c

Browse files
committed
update to lab 18
1 parent 57c974c commit 0fc756c

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"hoek": "6.x.x"
1414
},
1515
"devDependencies": {
16-
"lab": "17.x.x",
16+
"lab": "18.x.x",
1717
"markdown-toc": "1.1.x"
1818
},
1919
"scripts": {

test/index.js

+15
Original file line numberDiff line numberDiff line change
@@ -1219,6 +1219,21 @@ describe('expect()', () => {
12191219
Hoek.assert(exception.at.line !== Code.thrownAt(failed).line, 'Reports the wrong line number');
12201220
Hoek.assert(exception.at.filename === __filename, `expected ${exception.at.filename} to equal ${__filename}`);
12211221
});
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+
});
12221237
});
12231238

12241239
describe('empty()', () => {

0 commit comments

Comments
 (0)