Commit 11edbc37 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

missing jquery added

parent ebc53041
"use strict"; "use strict";
var $ = require('jquery');
var Annotation = require('../map/data/Annotation'); var Annotation = require('../map/data/Annotation');
var Chemical = require('../map/data/Chemical'); var Chemical = require('../map/data/Chemical');
var Drug = require('../map/data/Drug'); var Drug = require('../map/data/Drug');
......
"use strict"; "use strict";
require("../mocha-config"); require("../mocha-config");
var $ = require('jquery');
// noinspection JSUnusedLocalSymbols // noinspection JSUnusedLocalSymbols
var Promise = require("bluebird"); var Promise = require("bluebird");
...@@ -48,13 +49,16 @@ describe('Plugin', function () { ...@@ -48,13 +49,16 @@ describe('Plugin', function () {
it('test plugins', function () { it('test plugins', function () {
var promises = []; var promises = [];
global.$ = $;
fs.readdirSync('./testFiles/plugin/').forEach(function (file) { fs.readdirSync('./testFiles/plugin/').forEach(function (file) {
var element = document.createElement("div"); var element = document.createElement("div");
testDiv.appendChild(element); testDiv.appendChild(element);
var plugin = createPlugin("./testFiles/plugin/" + file); var plugin = createPlugin("./testFiles/plugin/" + file);
promises.push(plugin.load()); promises.push(plugin.load());
}); });
return Promise.all(promises); return Promise.all(promises).finally(function () {
global.$ = undefined;
});
}); });
describe('load', function () { describe('load', function () {
......
"use strict"; "use strict";
require("../mocha-config"); require("../mocha-config");
var $ = require('jquery');
var Plugin = require('../../../main/js/plugin/Plugin'); var Plugin = require('../../../main/js/plugin/Plugin');
var PluginManager = require('../../../main/js/plugin/PluginManager'); var PluginManager = require('../../../main/js/plugin/PluginManager');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment