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:
+13
-6
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user