summaryrefslogtreecommitdiff
path: root/priv/static/metrics-graphics-3.0-alpha3/tests/helpers.js
diff options
context:
space:
mode:
authorhref <href@random.sh>2021-09-01 10:30:18 +0200
committerhref <href@random.sh>2021-09-01 10:30:18 +0200
commit75687711f35355bc30e4829439384aab28fcac6d (patch)
tree8f3256f472893c39720a684d390e890a152f7303 /priv/static/metrics-graphics-3.0-alpha3/tests/helpers.js
parentlink: post_* callbacks; html & pdftitle. (diff)
Commit all the changes that hasn't been committed + updates.
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;
+}