]> git.ipfire.org Git - thirdparty/bootstrap.git/commit
Remove potential false positive assertions (#33288)
authorBen Lertlumprasertkul <benlertlumprasertkul@gmail.com>
Tue, 11 May 2021 05:45:57 +0000 (06:45 +0100)
committerGitHub <noreply@github.com>
Tue, 11 May 2021 05:45:57 +0000 (08:45 +0300)
commit052def456845c2147e4e6c99d17bba12fcbee34c
tree9f23d9f09941c43fd519bde2498da808a8764635
parent9c3ab6557ec89ae11cc27da1b4680b3e69381edf
Remove potential false positive assertions (#33288)

* Remove potential false positive assertions

querySelector() returns null but

expect(document.querySelector('...')).toBeDefined()

tests that the value is not undefined

* Migrated assertions from .toBeDefined() to .not.toBeNull() for .getInstance() calls in tests

* Migrate offcanvas assertions from .toBeDefined() to .not.toBeNull() for .getInstance() call

* convert more cases to not.toBeNull assertions

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
13 files changed:
js/tests/README.md
js/tests/unit/alert.spec.js
js/tests/unit/button.spec.js
js/tests/unit/carousel.spec.js
js/tests/unit/collapse.spec.js
js/tests/unit/dropdown.spec.js
js/tests/unit/modal.spec.js
js/tests/unit/offcanvas.spec.js
js/tests/unit/popover.spec.js
js/tests/unit/scrollspy.spec.js
js/tests/unit/tab.spec.js
js/tests/unit/toast.spec.js
js/tests/unit/tooltip.spec.js