strider-extension-loader
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -47,2 +47,5 @@ // | ||
function(err, results) { | ||
if (!results) | ||
results = []; | ||
results.forEach(function(r) { | ||
@@ -157,2 +160,3 @@ if (!r.stat) { | ||
if (type === 'webapp') { | ||
// Extensions should use context.route.<method>() to add routes | ||
context.route = { | ||
@@ -192,2 +196,6 @@ get:function(p, f) { | ||
}); | ||
if (loaded.length === 0) { | ||
// Bit odd, but necessary. | ||
this(null, []); | ||
} | ||
}, | ||
@@ -194,0 +202,0 @@ function(err, initialized) { |
{ | ||
"name": "strider-extension-loader", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Load Strider extensions", | ||
@@ -5,0 +5,0 @@ "main": "main.js", |
@@ -250,2 +250,20 @@ var EventEmitter = require('events').EventEmitter, | ||
it("should continue without extensions", function(done) { | ||
var emitter = new EventEmitter(); | ||
var config = {}; | ||
var appInstance = { | ||
use: function() { } | ||
}; | ||
var context = { | ||
config: config, | ||
emitter: emitter, | ||
extensionRoutes: [], | ||
}; | ||
loader.initExtensions("/tmp/nonexistant", "webapp", context, appInstance, function(err, initialized) { | ||
expect(initialized).to.have.length(0); | ||
expect(err).to.eql(null); | ||
done(); | ||
}); | ||
}); | ||
after(function(done) { | ||
@@ -252,0 +270,0 @@ exec("rm -rf node_modules_ext2", function() { |
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
22311
445