Comparing version 0.4.3 to 0.4.4
@@ -50,2 +50,4 @@ /* Copyright (c) 2012 Rod Vagg <@rvagg> */ | ||
EventEmitter.call(this) | ||
this.setMaxListeners(Infinity) | ||
this._options = extend(extend({}, defaultOptions), options) | ||
@@ -52,0 +54,0 @@ this._location = location |
{ | ||
"name": "levelup", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"dependencies": { | ||
@@ -5,0 +5,0 @@ "errno": { |
@@ -16,3 +16,3 @@ { | ||
] | ||
, "version": "0.4.3" | ||
, "version": "0.4.4" | ||
, "main": "lib/levelup.js" | ||
@@ -19,0 +19,0 @@ , "dependencies": { |
@@ -98,2 +98,27 @@ /* Copyright (c) 2012 Rod Vagg <@rvagg> */ | ||
} | ||
, 'maxListeners warning': function (done) { | ||
var location = common.nextLocation() | ||
// 1) open database without callback, opens in worker thread | ||
, db = levelup(location, { createIfMissing: true, errorIfExists: true, encoding: 'utf8' }) | ||
, stderrMock = this.mock(console) | ||
this.closeableDatabases.push(db) | ||
this.cleanupDirs.push(location) | ||
stderrMock.expects('error').never() | ||
// 2) provoke an EventEmitter maxListeners warning | ||
var toPut = 11 | ||
for (var i = 0; i < toPut; i++) { | ||
db.put('some', 'string', function (err) { | ||
refute(err) | ||
if (!--toPut) { | ||
done() | ||
} | ||
}) | ||
} | ||
} | ||
}) |
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
2993535
2961