From 967e6071bac797101daabe74c31cc3a5e6493fd4 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Wed, 6 May 2020 09:20:08 +0300 Subject: [PATCH] tests: streamline HTML end tags (#30648) --- js/tests/README.md | 2 +- js/tests/unit/button.spec.js | 10 ++-- js/tests/unit/carousel.spec.js | 2 +- js/tests/unit/collapse.spec.js | 32 +++++------ js/tests/unit/dropdown.spec.js | 8 +-- js/tests/unit/modal.spec.js | 84 +++++++++++++-------------- js/tests/unit/tab.spec.js | 12 +++- js/tests/unit/tooltip.spec.js | 100 ++++++++++++++++----------------- js/tests/visual/collapse.html | 2 +- js/tests/visual/tooltip.html | 2 +- 10 files changed, 130 insertions(+), 124 deletions(-) diff --git a/js/tests/README.md b/js/tests/README.md index 8823d05dc5..41fddb9a31 100644 --- a/js/tests/README.md +++ b/js/tests/README.md @@ -51,7 +51,7 @@ describe('getInstance', () => { // Asynchronous test it('should show a tooltip without the animation', done => { - fixtureEl.innerHTML = '' + fixtureEl.innerHTML = '' const tooltipEl = fixtureEl.querySelector('a') const tooltip = new Tooltip(tooltipEl, { diff --git a/js/tests/unit/button.spec.js b/js/tests/unit/button.spec.js index a3c95be1ba..f7caf23f62 100644 --- a/js/tests/unit/button.spec.js +++ b/js/tests/unit/button.spec.js @@ -143,7 +143,7 @@ describe('Button', () => { }) it('should add focus class on focus event', () => { - fixtureEl.innerHTML = '' + fixtureEl.innerHTML = '' const btn = fixtureEl.querySelector('.btn') const input = fixtureEl.querySelector('input') @@ -155,7 +155,7 @@ describe('Button', () => { }) it('should not add focus class', () => { - fixtureEl.innerHTML = '' + fixtureEl.innerHTML = '' const btn = fixtureEl.querySelector('button') const input = fixtureEl.querySelector('input') @@ -167,7 +167,7 @@ describe('Button', () => { }) it('should remove focus class on blur event', () => { - fixtureEl.innerHTML = '' + fixtureEl.innerHTML = '' const btn = fixtureEl.querySelector('.btn') const input = fixtureEl.querySelector('input') @@ -179,7 +179,7 @@ describe('Button', () => { }) it('should not remove focus class on blur event', () => { - fixtureEl.innerHTML = '' + fixtureEl.innerHTML = '' const btn = fixtureEl.querySelector('button') const input = fixtureEl.querySelector('input') @@ -211,7 +211,7 @@ describe('Button', () => { fixtureEl.innerHTML = [ '
', ' ', '
' ].join('') diff --git a/js/tests/unit/carousel.spec.js b/js/tests/unit/carousel.spec.js index 46659a032a..61ca52cb29 100644 --- a/js/tests/unit/carousel.spec.js +++ b/js/tests/unit/carousel.spec.js @@ -141,7 +141,7 @@ describe('Carousel', () => { '