mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Fix up runtime tests
This commit is contained in:
@@ -28,8 +28,18 @@ var typeRegistry = require("../../../../../red/runtime/nodes/registry/registry")
|
||||
|
||||
describe('nodes/registry/installer', function() {
|
||||
|
||||
var mockLog = {
|
||||
log: sinon.stub(),
|
||||
debug: sinon.stub(),
|
||||
trace: sinon.stub(),
|
||||
warn: sinon.stub(),
|
||||
info: sinon.stub(),
|
||||
metric: sinon.stub(),
|
||||
_: function() { return "abc"}
|
||||
}
|
||||
|
||||
before(function() {
|
||||
installer.init({});
|
||||
installer.init({log:mockLog, settings:{}});
|
||||
});
|
||||
afterEach(function() {
|
||||
if (child_process.spawn.restore) {
|
||||
@@ -74,7 +84,7 @@ describe('nodes/registry/installer', function() {
|
||||
});
|
||||
|
||||
installer.installModule("this_wont_exist").otherwise(function(err) {
|
||||
err.code.should.be.eql(404);
|
||||
err.should.have.property("code",404);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user