mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-05 16:42:29 +03:00
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>
This commit is contained in:
committed by
GitHub
parent
9c3ab6557e
commit
052def4568
@@ -368,7 +368,7 @@ describe('Tab', () => {
|
||||
|
||||
jQueryMock.fn.tab.call(jQueryMock)
|
||||
|
||||
expect(Tab.getInstance(div)).toBeDefined()
|
||||
expect(Tab.getInstance(div)).not.toBeNull()
|
||||
})
|
||||
|
||||
it('should not re create a tab', () => {
|
||||
|
||||
Reference in New Issue
Block a user