Skip to content
Browse files

tests: have the error message correspond with the BufferType

  • Loading branch information...
1 parent 9440805 commit c7d0be8e1e6a5621587634dd30138c7cfadefa1d @shama shama committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 abstract/put-get-del-test.js
View
4 abstract/put-get-del-test.js
@@ -98,7 +98,7 @@ module.exports.errorKeys = function (testFunc, BufferType) {
makeErrorKeyTest('null key', null, /key cannot be `null` or `undefined`/)
makeErrorKeyTest('undefined key', undefined, /key cannot be `null` or `undefined`/)
makeErrorKeyTest('empty String key', '', /key cannot be an empty String/)
- makeErrorKeyTest('empty Buffer key', new BufferType(0), /key cannot be an empty Buffer/)
+ makeErrorKeyTest('empty Buffer key', new BufferType(0), /key cannot be an empty \w*Buffer/)
makeErrorKeyTest('empty Array key', [], /key cannot be an empty String/)
}
@@ -136,7 +136,7 @@ module.exports.errorValues = function (testFunc, BufferType) {
makePutErrorTest('null value', 'foo', null, /value cannot be `null` or `undefined`/)
makePutErrorTest('undefined value', 'foo', undefined, /value cannot be `null` or `undefined`/)
makePutErrorTest('empty String value', 'foo', '', /value cannot be an empty String/)
- makePutErrorTest('empty Buffer value', 'foo', new BufferType(0), /value cannot be an empty Buffer/)
+ makePutErrorTest('empty Buffer value', 'foo', new BufferType(0), /value cannot be an empty \w*Buffer/)
makePutErrorTest('empty Array value', 'foo', [], /value cannot be an empty String/)
}

0 comments on commit c7d0be8

Please sign in to comment.
Something went wrong with that request. Please try again.