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

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/tests/index.html')
-rw-r--r--js/tests/index.html37
1 files changed, 30 insertions, 7 deletions
diff --git a/js/tests/index.html b/js/tests/index.html
index 8c6e858e41..c6d3d27af6 100644
--- a/js/tests/index.html
+++ b/js/tests/index.html
@@ -3,20 +3,44 @@
<head>
<title>Bootstrap Plugin Test Suite</title>
- <!-- jquery -->
+ <!-- jQuery -->
<script src="vendor/jquery.js"></script>
- <!-- qunit -->
+ <!-- QUnit -->
<link rel="stylesheet" href="vendor/qunit.css" media="screen">
<script src="vendor/qunit.js"></script>
<script>
// See https://github.com/axemclion/grunt-saucelabs#test-result-details-with-qunit
- QUnit.done(function(results) {
- window.global_test_results = results
+ var log = []
+ QUnit.done = function (test_results) {
+ var tests = log.map(function (details) {
+ return {
+ name: details.name,
+ result: details.result,
+ expected: details.expected,
+ actual: details.actual,
+ source: details.source
+ }
+ })
+ test_results.tests = tests
+
+ // Delaying results a bit because in real-world scenario you won't get them immediately
+ setTimeout(function () {
+ window.global_test_results = test_results
+ }, 2000)
+ }
+
+ QUnit.testStart(function (testDetails) {
+ QUnit.log = function (details) {
+ if (!details.result) {
+ details.name = testDetails.name
+ log.push(details)
+ }
+ }
})
</script>
- <!-- plugin sources -->
+ <!-- Plugin sources -->
<script>$.support.transition = false</script>
<script src="../../js/alert.js"></script>
<script src="../../js/button.js"></script>
@@ -30,8 +54,7 @@
<script src="../../js/popover.js"></script>
<script src="../../js/affix.js"></script>
- <!-- unit tests -->
- <script src="unit/transition.js"></script>
+ <!-- Unit tests -->
<script src="unit/alert.js"></script>
<script src="unit/button.js"></script>
<script src="unit/carousel.js"></script>