Push tests to window object

This commit is contained in:
Jiiks 2018-01-16 07:18:43 +02:00
parent 98d58b1303
commit a9b253ebad
2 changed files with 13 additions and 4 deletions

View File

@ -27585,7 +27585,6 @@ class PluginManager extends Module {
this.setState({
plugins: []
});
tests();
}
get plugins() {
@ -27662,7 +27661,7 @@ class PluginManager extends Module {
const _instance = new PluginManager();
async function tests() {
async function pluginManager() {
const pluginName = 'Example';
@ -27671,11 +27670,16 @@ async function tests() {
const plugin = await _instance.loadPlugin(pluginName);
//Attempt to load the same plugin again
const plugin2 = await _instance.loadPlugin(pluginName);
return true;
} catch (err) {
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 };
/***/ }),

View File

@ -41,7 +41,6 @@ class PluginManager extends Module {
this.setState({
plugins: []
});
tests();
}
get plugins() {
@ -114,7 +113,7 @@ class PluginManager extends Module {
const _instance = new PluginManager();
async function tests() {
async function pluginManager() {
const pluginName = 'Example';
@ -123,9 +122,15 @@ async function tests() {
const plugin = await _instance.loadPlugin(pluginName);
//Attempt to load the same plugin again
const plugin2 = await _instance.loadPlugin(pluginName);
return true;
} catch (err) {
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 }