Skip to content

Commit 1e2fefd

Browse files
committed
Update hoek. Closes #129
1 parent b458d13 commit 1e2fefd

File tree

4 files changed

+12
-25
lines changed

4 files changed

+12
-25
lines changed

.gitignore

+7-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
1-
.idea
2-
*.iml
3-
npm-debug.log
4-
dump.rdb
5-
node_modules
6-
results.tap
7-
results.xml
8-
config.json
9-
.DS_Store
10-
*/.DS_Store
11-
*/*/.DS_Store
12-
._*
13-
*/._*
14-
*/*/._*
1+
**/node_modules
2+
**/package-lock.json
3+
154
coverage.*
16-
.settings
17-
package-lock.json
185

6+
**/.DS_Store
7+
**/._*
8+
9+
**/*.pem

LICENSE

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2014-2017, Project contributors
1+
Copyright (c) 2014-2018, Project contributors
22
Copyright (c) 2014, Walmart
33
Copyright (c) 2011-2014 Jake Luer
44
All rights reserved.
@@ -27,6 +27,4 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2727

2828
* * *
2929

30-
The complete list of contributors can be found at: https://github.com/hapijs/code/graphs/contributors
31-
3230
The initial version of this module was adapted from Chai, copyright(c) 2011-2014 Jake Luer <[email protected]>, http://chaijs.com, MIT Licensed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"node": ">=8.9.0"
1414
},
1515
"dependencies": {
16-
"hoek": "5.x.x"
16+
"hoek": "6.x.x"
1717
},
1818
"devDependencies": {
1919
"lab": "17.x.x",

test/index.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -474,8 +474,7 @@ describe('expect()', () => {
474474

475475
it('validates assertion (not error)', () => {
476476

477-
const Custom = function () { };
478-
Hoek.inherits(Custom, Error);
477+
const Custom = class extends Error { };
479478

480479
try {
481480
Code.expect(false).to.not.be.an.error();
@@ -541,8 +540,7 @@ describe('expect()', () => {
541540

542541
it('validates assertion (missing message)', () => {
543542

544-
const Custom = function () { };
545-
Hoek.inherits(Custom, Error);
543+
const Custom = class extends Error { };
546544

547545
try {
548546
Code.expect(new Custom()).to.be.an.error('kaboom');
@@ -596,7 +594,7 @@ describe('expect()', () => {
596594
it('invalidates assertion (anonymous type)', () => {
597595

598596
const Custom = function () { };
599-
Hoek.inherits(Custom, Error);
597+
Util.inherits(Custom, Error);
600598
delete Custom.name; // Ensure that the type is anonymous
601599

602600
try {

0 commit comments

Comments
 (0)