0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Switch to Jasmine's toBeInstanceOf matcher

This commit is contained in:
XhmikosR 2020-11-16 17:23:09 +02:00
parent 9f6b342dc7
commit 51a208f119
11 changed files with 11 additions and 11 deletions

View File

@ -179,7 +179,7 @@ describe('Alert', () => {
const alert = new Alert(div) const alert = new Alert(div)
expect(Alert.getInstance(div)).toEqual(alert) 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', () => { it('should return null when there is no alert instance', () => {

View File

@ -137,7 +137,7 @@ describe('Button', () => {
const button = new Button(div) const button = new Button(div)
expect(Button.getInstance(div)).toEqual(button) 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', () => { it('should return null when there is no button instance', () => {

View File

@ -1070,7 +1070,7 @@ describe('Carousel', () => {
const carousel = new Carousel(div) const carousel = new Carousel(div)
expect(Carousel.getInstance(div)).toEqual(carousel) 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', () => { it('should return null when there is no carousel instance', () => {

View File

@ -812,7 +812,7 @@ describe('Collapse', () => {
const collapse = new Collapse(div) const collapse = new Collapse(div)
expect(Collapse.getInstance(div)).toEqual(collapse) 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', () => { it('should return null when there is no collapse instance', () => {

View File

@ -1612,7 +1612,7 @@ describe('Dropdown', () => {
const dropdown = new Dropdown(div) const dropdown = new Dropdown(div)
expect(Dropdown.getInstance(div)).toEqual(dropdown) 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', () => { it('should return null when there is no dropdown instance', () => {

View File

@ -1108,7 +1108,7 @@ describe('Modal', () => {
const modal = new Modal(div) const modal = new Modal(div)
expect(Modal.getInstance(div)).toEqual(modal) 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', () => { it('should return null when there is no modal instance', () => {

View File

@ -253,7 +253,7 @@ describe('Popover', () => {
const popover = new Popover(popoverEl) const popover = new Popover(popoverEl)
expect(Popover.getInstance(popoverEl)).toEqual(popover) 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', () => { it('should return null when there is no popover instance', () => {

View File

@ -641,7 +641,7 @@ describe('ScrollSpy', () => {
const scrollSpy = new ScrollSpy(div) const scrollSpy = new ScrollSpy(div)
expect(ScrollSpy.getInstance(div)).toEqual(scrollSpy) 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', () => { it('should return null if there is no instance', () => {

View File

@ -417,7 +417,7 @@ describe('Tab', () => {
const tab = new Tab(divEl) const tab = new Tab(divEl)
expect(Tab.getInstance(divEl)).toEqual(tab) expect(Tab.getInstance(divEl)).toEqual(tab)
expect(Tab.getInstance(divEl) instanceof Tab).toEqual(true) expect(Tab.getInstance(divEl)).toBeInstanceOf(Tab)
}) })
}) })

View File

@ -384,7 +384,7 @@ describe('Toast', () => {
const toast = new Toast(div) const toast = new Toast(div)
expect(Toast.getInstance(div)).toEqual(toast) 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', () => { it('should return null when there is no toast instance', () => {

View File

@ -1038,7 +1038,7 @@ describe('Tooltip', () => {
const alert = new Tooltip(div) const alert = new Tooltip(div)
expect(Tooltip.getInstance(div)).toEqual(alert) 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', () => { it('should return null when there is no tooltip instance', () => {