mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Adapt test after modification to uninstallModule
This commit is contained in:
parent
81937ddc45
commit
3275a76fb0
@ -25,6 +25,7 @@ var NR_TEST_UTILS = require("nr-test-utils");
|
||||
var installer = NR_TEST_UTILS.require("@node-red/registry/lib/installer");
|
||||
var registry = NR_TEST_UTILS.require("@node-red/registry/lib/index");
|
||||
var typeRegistry = NR_TEST_UTILS.require("@node-red/registry/lib/registry");
|
||||
let pluginRegistry = NR_TEST_UTILS.require("@node-red/registry/lib/plugins");
|
||||
const { events, exec, log, hooks } = NR_TEST_UTILS.require("@node-red/util");
|
||||
|
||||
describe('nodes/registry/installer', function() {
|
||||
@ -66,6 +67,9 @@ describe('nodes/registry/installer', function() {
|
||||
if (typeRegistry.setModulePendingUpdated.restore) {
|
||||
typeRegistry.setModulePendingUpdated.restore();
|
||||
}
|
||||
if (pluginRegistry.removeModule.restore) {
|
||||
pluginRegistry.removeModule.restore();
|
||||
}
|
||||
if (fs.statSync.restore) {
|
||||
fs.statSync.restore();
|
||||
}
|
||||
@ -502,6 +506,9 @@ describe('nodes/registry/installer', function() {
|
||||
var removeModule = sinon.stub(typeRegistry,"removeModule").callsFake(function(md) {
|
||||
return nodeInfo;
|
||||
});
|
||||
let removePluginModule = sinon.stub(pluginRegistry,"removeModule").callsFake(function(md) {
|
||||
return [];
|
||||
});
|
||||
var getModuleInfo = sinon.stub(registry,"getModuleInfo").callsFake(function(md) {
|
||||
return {nodes:[]};
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user