1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-12 00:24:03 +02:00

remove underscore for static methods

This commit is contained in:
Johann-S
2019-07-28 15:24:46 +02:00
parent 144220f0c5
commit dcba526775
32 changed files with 215 additions and 215 deletions

View File

@@ -32,10 +32,10 @@ Currently we're aiming for at least 90% test coverage for our code. To ensure yo
```js
// Synchronous test
describe('_getInstance', () => {
describe('getInstance', () => {
it('should return null if there is no instance', () => {
// Make assertion
expect(Tab._getInstance(fixtureEl)).toEqual(null)
expect(Tab.getInstance(fixtureEl)).toEqual(null)
})
it('should return this instance', () => {
@@ -45,7 +45,7 @@ describe('_getInstance', () => {
const tab = new Tab(divEl)
// Make assertion
expect(Tab._getInstance(divEl)).toEqual(tab)
expect(Tab.getInstance(divEl)).toEqual(tab)
})
})

View File

@@ -67,7 +67,7 @@
document.getElementById('btnShowToast').addEventListener('click', function () {
Array.from(document.querySelectorAll('.toast'))
.forEach(function (toastNode) {
var toast = Toast._getInstance(toastNode)
var toast = Toast.getInstance(toastNode)
toast.show()
})
})
@@ -75,7 +75,7 @@
document.getElementById('btnHideToast').addEventListener('click', function () {
Array.from(document.querySelectorAll('.toast'))
.forEach(function (toastNode) {
var toast = Toast._getInstance(toastNode)
var toast = Toast.getInstance(toastNode)
toast.hide()
})
})