diff options
| author | GeoSot <[email protected]> | 2021-03-17 07:44:15 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-03-17 07:44:15 +0200 |
| commit | c5083d5fc372b750ceea35d72cafa26562762b0c (patch) | |
| tree | 91ccd8f8a06dc8908dcd73036e8bdae2336e2808 /js/tests | |
| parent | c198eb6319d63c5414dbe3036ad160bd78d4cf01 (diff) | |
| download | bootstrap-c5083d5fc372b750ceea35d72cafa26562762b0c.tar.xz bootstrap-c5083d5fc372b750ceea35d72cafa26562762b0c.zip | |
Use more safe check for 'isDisabled' helper (#33385)
Diffstat (limited to 'js/tests')
| -rw-r--r-- | js/tests/unit/util/index.spec.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/js/tests/unit/util/index.spec.js b/js/tests/unit/util/index.spec.js index 24921d730..41c1ce2b8 100644 --- a/js/tests/unit/util/index.spec.js +++ b/js/tests/unit/util/index.spec.js @@ -347,16 +347,19 @@ describe('Util', () => { expect(Util.isDisabled(div2)).toEqual(true) }) - it('should return false if the element has disabled attribute with "false" value', () => { + it('should return false if the element has disabled attribute with "false" value, or doesn\'t have attribute', () => { fixtureEl.innerHTML = [ '<div>', ' <div id="element" disabled="false"></div>', + ' <div id="element1" ></div>', '</div>' ].join('') const div = fixtureEl.querySelector('#element') + const div1 = fixtureEl.querySelector('#element1') expect(Util.isDisabled(div)).toEqual(false) + expect(Util.isDisabled(div1)).toEqual(false) }) it('should return false if the element is not disabled ', () => { |
