diff options
| author | XhmikosR <[email protected]> | 2022-11-12 10:09:36 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2022-11-12 10:09:36 +0200 |
| commit | 5208dd10c4f43b304ebeb75dcf508e016515a248 (patch) | |
| tree | bb28a065c4e34eda5620ed3cd5bd83312c553e87 /js/tests/unit | |
| parent | 21e036bf137f393827ddb433af136312e6278961 (diff) | |
| download | bootstrap-5208dd10c4f43b304ebeb75dcf508e016515a248.tar.xz bootstrap-5208dd10c4f43b304ebeb75dcf508e016515a248.zip | |
ESLint: enable prefer-template rule (#37484)
Diffstat (limited to 'js/tests/unit')
| -rw-r--r-- | js/tests/unit/collapse.spec.js | 2 | ||||
| -rw-r--r-- | js/tests/unit/tab.spec.js | 2 | ||||
| -rw-r--r-- | js/tests/unit/util/config.spec.js | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/js/tests/unit/collapse.spec.js b/js/tests/unit/collapse.spec.js index 834d1b98e..d5af724fe 100644 --- a/js/tests/unit/collapse.spec.js +++ b/js/tests/unit/collapse.spec.js @@ -897,7 +897,7 @@ describe('Collapse', () => { const trigger2 = fixtureEl.querySelector('#trigger2') const trigger3 = fixtureEl.querySelector('#trigger3') const target1 = fixtureEl.querySelector('#test1') - const target2 = fixtureEl.querySelector('#' + CSS.escape('0/my/id')) + const target2 = fixtureEl.querySelector(`#${CSS.escape('0/my/id')}`) const target2Shown = () => { expect(trigger1).not.toHaveClass('collapsed') diff --git a/js/tests/unit/tab.spec.js b/js/tests/unit/tab.spec.js index 66238efbb..1ac5929e1 100644 --- a/js/tests/unit/tab.spec.js +++ b/js/tests/unit/tab.spec.js @@ -207,7 +207,7 @@ describe('Tab', () => { const tab = new Tab(profileTriggerEl) profileTriggerEl.addEventListener('shown.bs.tab', () => { - expect(fixtureEl.querySelector('#' + CSS.escape('2'))).toHaveClass('active') + expect(fixtureEl.querySelector(`#${CSS.escape('2')}`)).toHaveClass('active') done() }) diff --git a/js/tests/unit/util/config.spec.js b/js/tests/unit/util/config.spec.js index e1693c0c1..0037e09d7 100644 --- a/js/tests/unit/util/config.spec.js +++ b/js/tests/unit/util/config.spec.js @@ -128,7 +128,7 @@ describe('Config', () => { const obj = new DummyConfigClass() expect(() => { obj._typeCheckConfig(config) - }).toThrowError(TypeError, obj.constructor.NAME.toUpperCase() + ': Option "parent" provided type "number" but expected type "(string|element)".') + }).toThrowError(TypeError, `${obj.constructor.NAME.toUpperCase()}: Option "parent" provided type "number" but expected type "(string|element)".`) }) it('should return null stringified when null is passed', () => { |
