aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/collapse.js
diff options
context:
space:
mode:
authorJohann-S <[email protected]>2018-06-07 21:43:04 +0200
committerXhmikosR <[email protected]>2019-02-20 22:05:45 +0200
commit2b780787797da2bed2af0f95963be61e2b8e94a4 (patch)
treec5efa177458d3a64b4a072137b6c171ac65bfcfd /js/tests/unit/collapse.js
parent7eddee286eb76da4d057a59706e4c512206dab45 (diff)
downloadbootstrap-2b780787797da2bed2af0f95963be61e2b8e94a4.tar.xz
bootstrap-2b780787797da2bed2af0f95963be61e2b8e94a4.zip
fix(data): do not use data object in our unit tests
Diffstat (limited to 'js/tests/unit/collapse.js')
-rw-r--r--js/tests/unit/collapse.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js
index 8dccf5c18..66cf6af96 100644
--- a/js/tests/unit/collapse.js
+++ b/js/tests/unit/collapse.js
@@ -1,6 +1,8 @@
$(function () {
'use strict'
+ var Collapse = typeof window.bootstrap !== 'undefined' ? window.bootstrap.Collapse : window.Collapse
+
QUnit.module('collapse plugin')
QUnit.test('should be defined on jquery object', function (assert) {
@@ -473,7 +475,7 @@ $(function () {
EventHandler.trigger($target2[0], 'click')
$body2.toggleClass('show collapsing')
- Data.getData($body2[0], 'bs.collapse')._isTransitioning = true
+ Collapse._getInstance($body2[0])._isTransitioning = true
EventHandler.trigger($target1[0], 'click')