diff options
author | Rohit Sharma <rohit2sharma95@gmail.com> | 2020-07-22 22:33:11 +0300 |
---|---|---|
committer | XhmikosR <xhmikosr@gmail.com> | 2020-11-14 08:09:15 +0300 |
commit | 418f17ee2b849dafdc39623ba2378df9229164a7 (patch) | |
tree | 7446b75f6b2a8e8ad9f5f8ab8143b4d451c94a14 /js/tests/unit/button.spec.js | |
parent | fe961c192d951bde610cdcd4817f4d8548d33141 (diff) |
Add `bs` in data attributes
- Add `bs` in data APIs everywhere
- Update unit tests
Diffstat (limited to 'js/tests/unit/button.spec.js')
-rw-r--r-- | js/tests/unit/button.spec.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/js/tests/unit/button.spec.js b/js/tests/unit/button.spec.js index ac32b4b897..44d7b54b18 100644 --- a/js/tests/unit/button.spec.js +++ b/js/tests/unit/button.spec.js @@ -27,8 +27,8 @@ describe('Button', () => { describe('data-api', () => { it('should toggle active class on click', () => { fixtureEl.innerHTML = [ - '<button class="btn" data-toggle="button">btn</button>', - '<button class="btn testParent" data-toggle="button"><div class="test"></div></button>' + '<button class="btn" data-bs-toggle="button">btn</button>', + '<button class="btn testParent" data-bs-toggle="button"><div class="test"></div></button>' ].join('') const btn = fixtureEl.querySelector('.btn') @@ -53,7 +53,7 @@ describe('Button', () => { describe('toggle', () => { it('should toggle aria-pressed', () => { - fixtureEl.innerHTML = '<button class="btn" data-toggle="button" aria-pressed="false"></button>' + fixtureEl.innerHTML = '<button class="btn" data-bs-toggle="button" aria-pressed="false"></button>' const btnEl = fixtureEl.querySelector('.btn') const button = new Button(btnEl) @@ -70,7 +70,7 @@ describe('Button', () => { describe('dispose', () => { it('should dispose a button', () => { - fixtureEl.innerHTML = '<button class="btn" data-toggle="button"></button>' + fixtureEl.innerHTML = '<button class="btn" data-bs-toggle="button"></button>' const btnEl = fixtureEl.querySelector('.btn') const button = new Button(btnEl) @@ -85,7 +85,7 @@ describe('Button', () => { describe('jQueryInterface', () => { it('should handle config passed and toggle existing button', () => { - fixtureEl.innerHTML = '<button class="btn" data-toggle="button"></button>' + fixtureEl.innerHTML = '<button class="btn" data-bs-toggle="button"></button>' const btnEl = fixtureEl.querySelector('.btn') const button = new Button(btnEl) @@ -101,7 +101,7 @@ describe('Button', () => { }) it('should create new button instance and call toggle', () => { - fixtureEl.innerHTML = '<button class="btn" data-toggle="button"></button>' + fixtureEl.innerHTML = '<button class="btn" data-bs-toggle="button"></button>' const btnEl = fixtureEl.querySelector('.btn') @@ -115,7 +115,7 @@ describe('Button', () => { }) it('should just create a button instance without calling toggle', () => { - fixtureEl.innerHTML = '<button class="btn" data-toggle="button"></button>' + fixtureEl.innerHTML = '<button class="btn" data-bs-toggle="button"></button>' const btnEl = fixtureEl.querySelector('.btn') |