Permalink
Browse files

Merge pull request #23 from shama/buffertypeerror

tests: have the error message correspond with the BufferType
  • Loading branch information...
2 parents 9440805 + c7d0be8 commit 31a90f87a2be7fa38258f1ca2096f6205adb3266 @rvagg rvagg committed Jan 26, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 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 31a90f8

Please sign in to comment.