Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/tests/unit/dropdown.spec.js2
-rw-r--r--js/tests/unit/scrollspy.spec.js6
-rw-r--r--js/tests/unit/tooltip.spec.js2
-rw-r--r--js/tests/unit/util/swipe.spec.js8
-rw-r--r--js/tests/unit/util/template-factory.spec.js2
5 files changed, 10 insertions, 10 deletions
diff --git a/js/tests/unit/dropdown.spec.js b/js/tests/unit/dropdown.spec.js
index 991fca3902..8a25fafa87 100644
--- a/js/tests/unit/dropdown.spec.js
+++ b/js/tests/unit/dropdown.spec.js
@@ -73,7 +73,7 @@ describe('Dropdown', () => {
const dropdown = new Dropdown(btnDropdown, {
offset: getOffset,
popperConfig: {
- onFirstUpdate: state => {
+ onFirstUpdate(state) {
expect(getOffset).toHaveBeenCalledWith({
popper: state.rects.popper,
reference: state.rects.reference,
diff --git a/js/tests/unit/scrollspy.spec.js b/js/tests/unit/scrollspy.spec.js
index 291654d9be..96ef3aedf1 100644
--- a/js/tests/unit/scrollspy.spec.js
+++ b/js/tests/unit/scrollspy.spec.js
@@ -241,7 +241,7 @@ describe('ScrollSpy', () => {
contentEl,
scrollSpy,
spy,
- cb: () => {
+ cb() {
testElementIsActiveAfterScroll({
elementSelector: '#a-2',
targetSelector: '#div-2',
@@ -283,7 +283,7 @@ describe('ScrollSpy', () => {
contentEl,
scrollSpy,
spy,
- cb: () => {
+ cb() {
testElementIsActiveAfterScroll({
elementSelector: '#a-2',
targetSelector: '#div-2',
@@ -325,7 +325,7 @@ describe('ScrollSpy', () => {
contentEl,
scrollSpy,
spy,
- cb: () => {
+ cb() {
testElementIsActiveAfterScroll({
elementSelector: '#a-2',
targetSelector: '#div-2',
diff --git a/js/tests/unit/tooltip.spec.js b/js/tests/unit/tooltip.spec.js
index 4a9a6d3bb0..0713dabfb6 100644
--- a/js/tests/unit/tooltip.spec.js
+++ b/js/tests/unit/tooltip.spec.js
@@ -127,7 +127,7 @@ describe('Tooltip', () => {
const tooltip = new Tooltip(tooltipEl, {
offset: getOffset,
popperConfig: {
- onFirstUpdate: state => {
+ onFirstUpdate(state) {
expect(getOffset).toHaveBeenCalledWith({
popper: state.rects.popper,
reference: state.rects.reference,
diff --git a/js/tests/unit/util/swipe.spec.js b/js/tests/unit/util/swipe.spec.js
index 054aab6958..614f83e538 100644
--- a/js/tests/unit/util/swipe.spec.js
+++ b/js/tests/unit/util/swipe.spec.js
@@ -85,7 +85,7 @@ describe('Swipe', () => {
defineDocumentElementOntouchstart()
// eslint-disable-next-line no-new
new Swipe(swipeEl, {
- leftCallback: () => {
+ leftCallback() {
expect(spyRight).not.toHaveBeenCalled()
restorePointerEvents()
resolve()
@@ -107,7 +107,7 @@ describe('Swipe', () => {
defineDocumentElementOntouchstart()
// eslint-disable-next-line no-new
new Swipe(swipeEl, {
- rightCallback: () => {
+ rightCallback() {
expect(spyLeft).not.toHaveBeenCalled()
restorePointerEvents()
resolve()
@@ -190,7 +190,7 @@ describe('Swipe', () => {
defineDocumentElementOntouchstart()
// eslint-disable-next-line no-new
new Swipe(swipeEl, {
- rightCallback: () => {
+ rightCallback() {
deleteDocumentElementOntouchstart()
expect().nothing()
resolve()
@@ -215,7 +215,7 @@ describe('Swipe', () => {
defineDocumentElementOntouchstart()
// eslint-disable-next-line no-new
new Swipe(swipeEl, {
- leftCallback: () => {
+ leftCallback() {
expect().nothing()
deleteDocumentElementOntouchstart()
resolve()
diff --git a/js/tests/unit/util/template-factory.spec.js b/js/tests/unit/util/template-factory.spec.js
index 0fdf871466..5e5724c5f8 100644
--- a/js/tests/unit/util/template-factory.spec.js
+++ b/js/tests/unit/util/template-factory.spec.js
@@ -99,7 +99,7 @@ describe('TemplateFactory', () => {
it('should resolve class if function is given', () => {
const factory = new TemplateFactory({
- extraClass: arg => {
+ extraClass(arg) {
expect(arg).toEqual(factory)
return 'testClass'
}