abstract-leveldown
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -19,3 +19,3 @@ var db | ||
db.batch([{ type: 'put', key: 'foo1' }], function (err) { | ||
t.like(err.message, /value cannot be `null` or `undefined`/, 'correct error message') | ||
t.equal(err.message, 'value cannot be `null` or `undefined`', 'correct error message') | ||
t.end() | ||
@@ -27,3 +27,3 @@ }) | ||
db.batch([{ type: 'put', key: 'foo1', value: null }], function (err) { | ||
t.like(err.message, /value cannot be `null` or `undefined`/, 'correct error message') | ||
t.equal(err.message, 'value cannot be `null` or `undefined`', 'correct error message') | ||
t.end() | ||
@@ -35,3 +35,3 @@ }) | ||
db.batch([{ type: 'put', value: 'foo1' }], function (err) { | ||
t.like(err.message, /key cannot be `null` or `undefined`/, 'correct error message') | ||
t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') | ||
t.end() | ||
@@ -43,3 +43,3 @@ }) | ||
db.batch([{ type: 'put', key: null, value: 'foo1' }], function (err) { | ||
t.like(err.message, /key cannot be `null` or `undefined`/, 'correct error message') | ||
t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') | ||
t.end() | ||
@@ -51,3 +51,3 @@ }) | ||
db.batch([{ type: 'put' }], function (err) { | ||
t.like(err.message, /key cannot be `null` or `undefined`/, 'correct error message') | ||
t.equal(err.message, 'key cannot be `null` or `undefined`', 'correct error message') | ||
t.end() | ||
@@ -72,5 +72,10 @@ }) | ||
t.notOk(err, 'no error') | ||
t.type(value, Buffer) | ||
t.equal(value.toString(), 'bar') | ||
var result | ||
if (value instanceof ArrayBuffer) { | ||
result = String.fromCharCode.apply(null, new Uint16Array(value)) | ||
} else { | ||
t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) | ||
result = value.toString() | ||
} | ||
t.equal(result, 'bar') | ||
t.end() | ||
@@ -98,4 +103,10 @@ }) | ||
t.notOk(err, 'no error') | ||
t.type(value, Buffer) | ||
t.equal(value.toString(), 'bar1') | ||
var result | ||
if (value instanceof ArrayBuffer) { | ||
result = String.fromCharCode.apply(null, new Uint16Array(value)) | ||
} else { | ||
t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) | ||
result = value.toString() | ||
} | ||
t.equal(result, 'bar1') | ||
done() | ||
@@ -107,3 +118,3 @@ }) | ||
t.notOk(value, 'value not returned') | ||
t.like(err.message, /NotFound/) | ||
t.ok(/NotFound/.test(err.message), 'NotFound error') | ||
done() | ||
@@ -114,4 +125,10 @@ }) | ||
t.notOk(err, 'no error') | ||
t.type(value, Buffer) | ||
t.equal(value.toString(), 'bar3') | ||
var result | ||
if (value instanceof ArrayBuffer) { | ||
result = String.fromCharCode.apply(null, new Uint16Array(value)) | ||
} else { | ||
t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) | ||
result = value.toString() | ||
} | ||
t.equal(result, 'bar3') | ||
done() | ||
@@ -118,0 +135,0 @@ }) |
@@ -53,3 +53,3 @@ var db | ||
t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) | ||
result= value.toString() | ||
result = value.toString() | ||
} | ||
@@ -68,3 +68,3 @@ | ||
t.ok(typeof Buffer != 'undefined' && value instanceof Buffer) | ||
result= value.toString() | ||
result = value.toString() | ||
} | ||
@@ -71,0 +71,0 @@ |
@@ -49,3 +49,3 @@ /**** SETUP & UTILITY STUFF ****/ | ||
t.ok(typeof Buffer != 'undefined' && _value instanceof Buffer) | ||
result= _value.toString() | ||
result = _value.toString() | ||
} | ||
@@ -52,0 +52,0 @@ |
{ | ||
"name" : "abstract-leveldown" | ||
, "description" : "An abstract prototype matching the LevelDOWN API" | ||
, "version" : "0.7.0" | ||
, "version" : "0.7.1" | ||
, "homepage" : "https://github.com/rvagg/node-abstract-leveldown" | ||
@@ -6,0 +6,0 @@ , "contributors" : [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
83544
1827