summaryrefslogtreecommitdiff
path: root/priv/static/metrics-graphics-3.0-alpha3/tests/helpers.js
diff options
context:
space:
mode:
Diffstat (limited to 'priv/static/metrics-graphics-3.0-alpha3/tests/helpers.js')
-rw-r--r--priv/static/metrics-graphics-3.0-alpha3/tests/helpers.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/priv/static/metrics-graphics-3.0-alpha3/tests/helpers.js b/priv/static/metrics-graphics-3.0-alpha3/tests/helpers.js
new file mode 100644
index 0000000..22d30ad
--- /dev/null
+++ b/priv/static/metrics-graphics-3.0-alpha3/tests/helpers.js
@@ -0,0 +1,20 @@
+function generateMouseEvent(type) {
+ var event = document.createEvent('MouseEvent');
+ event.initEvent(type, true, true);
+ return event;
+}
+
+// essentially the same as $.extend
+function extend(){
+ var result = {},
+ $__arguments = [].slice.call(arguments);
+
+ $__arguments.forEach(function(obj) {
+ for (var prop in obj) {
+ if (obj.hasOwnProperty(prop)) {
+ result[prop] = obj[prop];
+ }
+ }
+ });
+ return result;
+}