2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

Allow us to run our unit test on differents jquery version

This commit is contained in:
Johann-S
2017-11-10 11:25:47 +01:00
committed by XhmikosR
parent cdab56d940
commit e8ba37139f
6 changed files with 1058 additions and 203 deletions
+13 -6
View File
@@ -6,7 +6,19 @@
<title>Bootstrap Plugin Test Suite</title>
<!-- jQuery -->
<script src="../../assets/js/vendor/jquery-slim.min.js"></script>
<script>
(function () {
var path = '../../assets/js/vendor/jquery-slim.min.js'
// get jquery param from the query string.
var jQueryVersion = location.search.match(/[?&]jquery=(.*?)(?=&|$)/)
// If a version was specified, use that version from our vendor folder
if (jQueryVersion) {
path = 'vendor/jquery-' + jQueryVersion[1] + '.min.js'
}
document.write('<script src="' + path + '"><\/script>')
}())
</script>
<script src="../../assets/js/vendor/popper.min.js"></script>
<!-- QUnit -->
@@ -77,11 +89,6 @@
})
})
// Cleanup
QUnit.testDone(function () {
$('#modal-test, .modal-backdrop').remove()
})
// Display fixture on-screen on iOS to avoid false positives
// See https://github.com/twbs/bootstrap/pull/15955
if (/iPhone|iPad|iPod/.test(navigator.userAgent)) {