aboutsummaryrefslogtreecommitdiffhomepage
path: root/public/bower_components/bootstrap-datepicker/tests/assets/qunit-logging.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/bower_components/bootstrap-datepicker/tests/assets/qunit-logging.js')
-rw-r--r--public/bower_components/bootstrap-datepicker/tests/assets/qunit-logging.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/public/bower_components/bootstrap-datepicker/tests/assets/qunit-logging.js b/public/bower_components/bootstrap-datepicker/tests/assets/qunit-logging.js
new file mode 100644
index 0000000..5bef1a5
--- /dev/null
+++ b/public/bower_components/bootstrap-datepicker/tests/assets/qunit-logging.js
@@ -0,0 +1,29 @@
+// Dummy logging calls (ie, if tests are run in IE)
+window.console = window.console || {};
+window.console.log = window.console.log || function(){};
+window.console.debug = window.console.debug || function(){};
+window.console.info = window.console.info || function(){};
+window.console.warn = window.console.warn || function(){};
+window.console.error = window.console.error || function(){};
+
+(function() {
+ var modName, testName;
+
+ //arg: { name }
+ QUnit.testStart = function(t) {
+ modName = t.module;
+ testName = t.name;
+ };
+
+ //arg: { name, failed, passed, total }
+ QUnit.testDone = function(t) {
+ if (t.failed)
+ console.log('Test "' + t.module + ': ' + t.name + '" completed: ' + (0 === t.failed ? 'pass' : 'FAIL') + '\n')
+ };
+
+ //{ result, actual, expected, message }
+ QUnit.log = function(t) {
+ if (!t.result)
+ console.log('Test "' + modName + ': ' + testName + '" assertion failed. Expected <' + t.expected + '> Actual <' + t.actual + '>' + (t.message ? ': \'' + t.message + '\'' : ''));
+ };
+}());