diff --git a/core-js/pom.xml b/core-js/pom.xml
index d1d20d72..9591eb2d 100644
--- a/core-js/pom.xml
+++ b/core-js/pom.xml
@@ -56,7 +56,6 @@
Functions.js
- CHROME
diff --git a/mindplot/pom.xml b/mindplot/pom.xml
index ffe8f675..18d2c385 100644
--- a/mindplot/pom.xml
+++ b/mindplot/pom.xml
@@ -257,7 +257,7 @@
com.github.searls
jasmine-maven-plugin
- 1.3.1.4
+ 1.3.1.5
@@ -266,12 +266,16 @@
+
- libraries/mootools/mootools-core-1.4.5-full-nocompat.js
- header.js
+ libraries/mootools/mootools-core-1.4.5-full-nocompat-yc.js
+ header.js
+ libraries/jquery/jquery-2.1.0.min.js
+ Events.js
static/test/*.js
diff --git a/mindplot/src/test/javascript/EventsTestSuite.js b/mindplot/src/test/javascript/EventsTestSuite.js
new file mode 100644
index 00000000..6f2c548b
--- /dev/null
+++ b/mindplot/src/test/javascript/EventsTestSuite.js
@@ -0,0 +1,43 @@
+var TestClass = new Class({
+ Extends: mindplot.Events,
+
+ getEvents: function() {
+ return this.$events;
+ },
+
+ removeEvents: function() {
+ this.$events = {};
+ }
+});
+
+// Test class and variables
+var expectedChangeFn1 = function () {return 'change1';};
+var expectedChangeFn2 = function () {return 'change2';};
+var expectedLoadFn = function() {return 'loaded';};
+var myTestClass = new TestClass();
+
+
+describe("Events class suite", function() {
+
+ afterEach(function() {
+ myTestClass.removeEvents();
+ });
+
+ it("addEventTest", function() {
+ expect(myTestClass.getEvents()).toEqual({});
+ myTestClass.addEvent('change', expectedChangeFn1);
+ expect(myTestClass.getEvents()).toEqual({change: [expectedChangeFn1]});
+ myTestClass.addEvent('change', expectedChangeFn2);
+ expect(myTestClass.getEvents()).toEqual({change: [expectedChangeFn1, expectedChangeFn2]});
+ myTestClass.addEvent('load', expectedLoadFn);
+ expect(myTestClass.getEvents()).toEqual({change: [expectedChangeFn1, expectedChangeFn2], load: [expectedLoadFn]});
+ });
+ it("removeEventTest", function() {
+ expect(myTestClass.getEvents()).toEqual({});
+ myTestClass.addEvent('change', expectedChangeFn1);
+ myTestClass.addEvent('change', expectedChangeFn2);
+ expect(myTestClass.getEvents()).toEqual({change: [expectedChangeFn1, expectedChangeFn2]});
+ myTestClass.removeEvent('change', expectedChangeFn1);
+ expect(myTestClass.getEvents()).toEqual({change: [expectedChangeFn2]});
+ });
+});