level-packager
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -11,3 +11,3 @@ const levelup = require('levelup') | ||
return levelup(encode(leveldown(location)), options, callback) | ||
return levelup(encode(leveldown(location), options), options, callback) | ||
} | ||
@@ -14,0 +14,0 @@ |
{ | ||
"name": "level-packager", | ||
"description": "LevelUP package helper for distributing with a LevelDOWN-compatible back-end", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"contributors": [ | ||
@@ -6,0 +6,0 @@ "Rod Vagg <r@va.gg> (https://github.com/rvagg)", |
20
test.js
@@ -76,2 +76,22 @@ const fs = require('fs') | ||
test('options.keyEncoding and options.valueEncoding are passed on to encoding-down', function (t) { | ||
var db = level(location, { keyEncoding: 'json', valueEncoding: 'json' }) | ||
db.on('ready', function () { | ||
var codec = db.db.codec | ||
t.equal(codec.opts.keyEncoding, 'json', 'keyEncoding correct') | ||
t.equal(codec.opts.valueEncoding, 'json', 'valueEncoding correct') | ||
db.close(t.end.bind(t)) | ||
}) | ||
}) | ||
test('encoding options default to utf8', function (t) { | ||
var db = level(location) | ||
db.on('ready', function () { | ||
var codec = db.db.codec | ||
t.equal(codec.opts.keyEncoding, 'utf8', 'keyEncoding correct') | ||
t.equal(codec.opts.valueEncoding, 'utf8', 'valueEncoding correct') | ||
db.close(t.end.bind(t)) | ||
}) | ||
}) | ||
if (!options.skipRepairTest) { | ||
@@ -78,0 +98,0 @@ test('test repair', function (t) { |
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
10874
129