Push tests to window object
This commit is contained in:
parent
98d58b1303
commit
a9b253ebad
|
@ -27585,7 +27585,6 @@ class PluginManager extends Module {
|
||||||
this.setState({
|
this.setState({
|
||||||
plugins: []
|
plugins: []
|
||||||
});
|
});
|
||||||
tests();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get plugins() {
|
get plugins() {
|
||||||
|
@ -27662,7 +27661,7 @@ class PluginManager extends Module {
|
||||||
|
|
||||||
const _instance = new PluginManager();
|
const _instance = new PluginManager();
|
||||||
|
|
||||||
async function tests() {
|
async function pluginManager() {
|
||||||
|
|
||||||
const pluginName = 'Example';
|
const pluginName = 'Example';
|
||||||
|
|
||||||
|
@ -27671,11 +27670,16 @@ async function tests() {
|
||||||
const plugin = await _instance.loadPlugin(pluginName);
|
const plugin = await _instance.loadPlugin(pluginName);
|
||||||
//Attempt to load the same plugin again
|
//Attempt to load the same plugin again
|
||||||
const plugin2 = await _instance.loadPlugin(pluginName);
|
const plugin2 = await _instance.loadPlugin(pluginName);
|
||||||
|
|
||||||
|
return true;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(`Failed to load plugin! ${err.message}`);
|
console.log(`Failed to load plugin! ${err.message}`);
|
||||||
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (window.bdTests) window.bdTests.pluginManager = pluginManager;else window.bdTests = { pluginManager };
|
||||||
|
|
||||||
module.exports = { PluginManager: _instance };
|
module.exports = { PluginManager: _instance };
|
||||||
|
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
|
@ -41,7 +41,6 @@ class PluginManager extends Module {
|
||||||
this.setState({
|
this.setState({
|
||||||
plugins: []
|
plugins: []
|
||||||
});
|
});
|
||||||
tests();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get plugins() {
|
get plugins() {
|
||||||
|
@ -114,7 +113,7 @@ class PluginManager extends Module {
|
||||||
|
|
||||||
const _instance = new PluginManager();
|
const _instance = new PluginManager();
|
||||||
|
|
||||||
async function tests() {
|
async function pluginManager() {
|
||||||
|
|
||||||
const pluginName = 'Example';
|
const pluginName = 'Example';
|
||||||
|
|
||||||
|
@ -123,9 +122,15 @@ async function tests() {
|
||||||
const plugin = await _instance.loadPlugin(pluginName);
|
const plugin = await _instance.loadPlugin(pluginName);
|
||||||
//Attempt to load the same plugin again
|
//Attempt to load the same plugin again
|
||||||
const plugin2 = await _instance.loadPlugin(pluginName);
|
const plugin2 = await _instance.loadPlugin(pluginName);
|
||||||
|
|
||||||
|
return true;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(`Failed to load plugin! ${err.message}`);
|
console.log(`Failed to load plugin! ${err.message}`);
|
||||||
|
throw err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (window.bdTests) window.bdTests.pluginManager = pluginManager;
|
||||||
|
else window.bdTests = { pluginManager };
|
||||||
|
|
||||||
module.exports = { PluginManager: _instance }
|
module.exports = { PluginManager: _instance }
|
Loading…
Reference in New Issue