]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Switch to Jasmine's `toBeInstanceOf` matcher
authorXhmikosR <xhmikosr@gmail.com>
Mon, 16 Nov 2020 15:23:09 +0000 (17:23 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Sun, 29 Nov 2020 18:58:26 +0000 (20:58 +0200)
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/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

index 52643e575d73428822c5f1b4e703c76a52c82213..a1322f1c7b92e20e2df169580ddd1c7e6917aff8 100644 (file)
@@ -179,7 +179,7 @@ describe('Alert', () => {
       const alert = new Alert(div)
 
       expect(Alert.getInstance(div)).toEqual(alert)
-      expect(Alert.getInstance(div) instanceof Alert).toEqual(true)
+      expect(Alert.getInstance(div)).toBeInstanceOf(Alert)
     })
 
     it('should return null when there is no alert instance', () => {
index e7f6566ea3ff2b0e1e16f6046163114899bcfdb8..51aa73774c45908f449dfad1e5e71719789300af 100644 (file)
@@ -137,7 +137,7 @@ describe('Button', () => {
       const button = new Button(div)
 
       expect(Button.getInstance(div)).toEqual(button)
-      expect(Button.getInstance(div) instanceof Button).toEqual(true)
+      expect(Button.getInstance(div)).toBeInstanceOf(Button)
     })
 
     it('should return null when there is no button instance', () => {
index a21003dc5e13e2945fa9c09285cd477486d0a053..07b8fc311d3d5df94a6b27ff604b985ed2f2e08d 100644 (file)
@@ -1070,7 +1070,7 @@ describe('Carousel', () => {
       const carousel = new Carousel(div)
 
       expect(Carousel.getInstance(div)).toEqual(carousel)
-      expect(Carousel.getInstance(div) instanceof Carousel).toEqual(true)
+      expect(Carousel.getInstance(div)).toBeInstanceOf(Carousel)
     })
 
     it('should return null when there is no carousel instance', () => {
index e5c8c53b5b751c6393b9fcbad06700c3431ce6db..d53ab59643d00b649f4429111ac4ecf9cbdc81c0 100644 (file)
@@ -812,7 +812,7 @@ describe('Collapse', () => {
       const collapse = new Collapse(div)
 
       expect(Collapse.getInstance(div)).toEqual(collapse)
-      expect(Collapse.getInstance(div) instanceof Collapse).toEqual(true)
+      expect(Collapse.getInstance(div)).toBeInstanceOf(Collapse)
     })
 
     it('should return null when there is no collapse instance', () => {
index 96f677c02ccf34410fe442d729a0688172b760bd..145763d20f9943b97f378913bd76b3905e3e35aa 100644 (file)
@@ -1612,7 +1612,7 @@ describe('Dropdown', () => {
       const dropdown = new Dropdown(div)
 
       expect(Dropdown.getInstance(div)).toEqual(dropdown)
-      expect(Dropdown.getInstance(div) instanceof Dropdown).toEqual(true)
+      expect(Dropdown.getInstance(div)).toBeInstanceOf(Dropdown)
     })
 
     it('should return null when there is no dropdown instance', () => {
index 8e8d4f0ff66c9b405498f8a3b2e9d60687afbef2..f645e9892bb4c17af643c5797823eec8126a4d31 100644 (file)
@@ -1108,7 +1108,7 @@ describe('Modal', () => {
       const modal = new Modal(div)
 
       expect(Modal.getInstance(div)).toEqual(modal)
-      expect(Modal.getInstance(div) instanceof Modal).toEqual(true)
+      expect(Modal.getInstance(div)).toBeInstanceOf(Modal)
     })
 
     it('should return null when there is no modal instance', () => {
index 3a8342a80fad7d7614d6b14902b5b62d8580dfb1..3c04e7ac1409d0f6dc37f6380ea83e424b54e987 100644 (file)
@@ -253,7 +253,7 @@ describe('Popover', () => {
       const popover = new Popover(popoverEl)
 
       expect(Popover.getInstance(popoverEl)).toEqual(popover)
-      expect(Popover.getInstance(popoverEl) instanceof Popover).toEqual(true)
+      expect(Popover.getInstance(popoverEl)).toBeInstanceOf(Popover)
     })
 
     it('should return null when there is no popover instance', () => {
index 303a336f442e4e247f53bb10201a890c89333ba1..45de56fbe58b3e53e1578d74417ad4290b9e6a67 100644 (file)
@@ -641,7 +641,7 @@ describe('ScrollSpy', () => {
       const scrollSpy = new ScrollSpy(div)
 
       expect(ScrollSpy.getInstance(div)).toEqual(scrollSpy)
-      expect(ScrollSpy.getInstance(div) instanceof ScrollSpy).toEqual(true)
+      expect(ScrollSpy.getInstance(div)).toBeInstanceOf(ScrollSpy)
     })
 
     it('should return null if there is no instance', () => {
index 7112dda181d01ecd407fd4e204dde534be6cb6db..67a85b2e4030a57be59207dea4a83c1000ca876a 100644 (file)
@@ -417,7 +417,7 @@ describe('Tab', () => {
       const tab = new Tab(divEl)
 
       expect(Tab.getInstance(divEl)).toEqual(tab)
-      expect(Tab.getInstance(divEl) instanceof Tab).toEqual(true)
+      expect(Tab.getInstance(divEl)).toBeInstanceOf(Tab)
     })
   })
 
index 60c7d9177bbe90dd158c6942e3c3f79d460a6a88..a4ab4f76cd3ca96813006cd4f558602c288b5793 100644 (file)
@@ -384,7 +384,7 @@ describe('Toast', () => {
       const toast = new Toast(div)
 
       expect(Toast.getInstance(div)).toEqual(toast)
-      expect(Toast.getInstance(div) instanceof Toast).toEqual(true)
+      expect(Toast.getInstance(div)).toBeInstanceOf(Toast)
     })
 
     it('should return null when there is no toast instance', () => {
index 36316b42f9cbb749e3197de32d3adf2eb8735710..e8572b30017c8941a8f47f99f1fb02c9ed3d91c3 100644 (file)
@@ -1038,7 +1038,7 @@ describe('Tooltip', () => {
       const alert = new Tooltip(div)
 
       expect(Tooltip.getInstance(div)).toEqual(alert)
-      expect(Tooltip.getInstance(div) instanceof Tooltip).toEqual(true)
+      expect(Tooltip.getInstance(div)).toBeInstanceOf(Tooltip)
     })
 
     it('should return null when there is no tooltip instance', () => {