Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Steur <tsteur@users.noreply.github.com>2016-12-16 06:46:16 +0300
committerMatthieu Aubry <mattab@users.noreply.github.com>2016-12-16 06:46:16 +0300
commit8895d90d97a0c0d1a324861a6b23e1dda83b366e (patch)
treecd4ba92aa672d47760973b81e50783b01b220b81 /tests/javascript
parent6233a8e412118f4d27d03761086750e232e9562b (diff)
Expose JSON property for Piwik custom trackers (#11025)
* expose JSON property for Piwik custom trackers * added test
Diffstat (limited to 'tests/javascript')
-rw-r--r--tests/javascript/index.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/javascript/index.php b/tests/javascript/index.php
index 3cc05b286e..5281353e14 100644
--- a/tests/javascript/index.php
+++ b/tests/javascript/index.php
@@ -610,7 +610,7 @@ function PiwikTest() {
});
test("Piwik plugin methods", function() {
- expect(26);
+ expect(31);
// TESTS FOR retryMissedPluginCalls
@@ -720,6 +720,12 @@ function PiwikTest() {
triggerEvent(_e('click7'), 'myCustomEvent');
strictEqual(true, customEvent, "DOM.addEventListener works");
+
+ strictEqual('object', typeof Piwik.JSON, "Piwik.JSON object is defined");
+ strictEqual('function', typeof Piwik.JSON.stringify, "JSON.stringify method is defined");
+ strictEqual('function', typeof Piwik.JSON.parse, "JSON.parse method is defined");
+ strictEqual('[]', Piwik.JSON.stringify([]));
+ propEqual([], Piwik.JSON.parse('[]'));
});
test("Query", function() {