]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
tests: fix a few typos
authorXhmikosR <xhmikosr@gmail.com>
Fri, 26 Nov 2021 08:09:12 +0000 (10:09 +0200)
committerXhmikosR <xhmikosr@gmail.com>
Wed, 1 Dec 2021 12:30:49 +0000 (14:30 +0200)
js/tests/unit/dom/data.spec.js
js/tests/unit/tooltip.spec.js
js/tests/unit/util/backdrop.spec.js

index bf389cded668c63939da792d29d9fe370161b3e7..e898cbba21d26614d89359e5e0b4ea3515373864 100644 (file)
@@ -65,7 +65,7 @@ describe('Data', () => {
     expect(Data.get(div, TEST_KEY)).toBe(copy)
   })
 
-  it('should do nothing when an element have nothing stored', () => {
+  it('should do nothing when an element has nothing stored', () => {
     Data.remove(div, TEST_KEY)
 
     expect().nothing()
index d8ca21a630e7215ae88d5fad7d9fca6b9a7892e3..87f6c0a10acc95abe4a63a4ad48730d346d0cb31 100644 (file)
@@ -415,7 +415,7 @@ describe('Tooltip', () => {
       tooltip.show()
     })
 
-    it('should show a tooltip when hovering a children element', done => {
+    it('should show a tooltip when hovering a child element', done => {
       fixtureEl.innerHTML = [
         '<a href="#" rel="tooltip" title="Another tooltip">',
         '  <svg xmlns="http://www.w3.org/2000/svg" width="50" height="50" viewBox="0 0 100 100">',
index 4fa9e543668fc33a59c10cb2bc02eadbbb9e81a1..43036938056f0f13dc1113adb92a74acb004c1af 100644 (file)
@@ -23,7 +23,7 @@ describe('Backdrop', () => {
   })
 
   describe('show', () => {
-    it('if it is "shown", should append the backdrop html once, on show, and contain "show" class', done => {
+    it('should append the backdrop html once on show and include the "show" class if it is "shown"', done => {
       const instance = new Backdrop({
         isVisible: true,
         isAnimated: false
@@ -43,7 +43,7 @@ describe('Backdrop', () => {
       })
     })
 
-    it('if it is not "shown", should not append the backdrop html', done => {
+    it('should not append the backdrop html if it is not "shown"', done => {
       const instance = new Backdrop({
         isVisible: false,
         isAnimated: true
@@ -57,7 +57,7 @@ describe('Backdrop', () => {
       })
     })
 
-    it('if it is "shown" and "animated", should append the backdrop html once, and contain "fade" class', done => {
+    it('should append the backdrop html once and include the "fade" class if it is "shown" and "animated"', done => {
       const instance = new Backdrop({
         isVisible: true,
         isAnimated: true
@@ -96,7 +96,7 @@ describe('Backdrop', () => {
       })
     })
 
-    it('should remove "show" class', done => {
+    it('should remove the "show" class', done => {
       const instance = new Backdrop({
         isVisible: true,
         isAnimated: true
@@ -110,7 +110,7 @@ describe('Backdrop', () => {
       })
     })
 
-    it('if it is not "shown", should not try to remove Node on remove method', done => {
+    it('should not try to remove Node on remove method if it is not "shown"', done => {
       const instance = new Backdrop({
         isVisible: false,
         isAnimated: true
@@ -153,7 +153,7 @@ describe('Backdrop', () => {
   })
 
   describe('click callback', () => {
-    it('it should execute callback on click', done => {
+    it('should execute callback on click', done => {
       const spy = jasmine.createSpy('spy')
 
       const instance = new Backdrop({
@@ -178,7 +178,7 @@ describe('Backdrop', () => {
   })
 
   describe('animation callbacks', () => {
-    it('if it is animated, should show and hide backdrop after counting transition duration', done => {
+    it('should show and hide backdrop after counting transition duration if it is animated', done => {
       const instance = new Backdrop({
         isVisible: true,
         isAnimated: true
@@ -200,7 +200,7 @@ describe('Backdrop', () => {
       expect(spy2).not.toHaveBeenCalled()
     })
 
-    it('if it is not animated, should show and hide backdrop without delay', done => {
+    it('should show and hide backdrop without a delay if it is not animated', done => {
       const spy = jasmine.createSpy('spy', getTransitionDurationFromElement)
       const instance = new Backdrop({
         isVisible: true,
@@ -218,7 +218,7 @@ describe('Backdrop', () => {
       }, 10)
     })
 
-    it('if it is not "shown", should not call delay callbacks', done => {
+    it('should not call delay callbacks if it is not "shown"', done => {
       const instance = new Backdrop({
         isVisible: false,
         isAnimated: true
@@ -235,7 +235,7 @@ describe('Backdrop', () => {
 
   describe('Config', () => {
     describe('rootElement initialization', () => {
-      it('Should be appended on "document.body" by default', done => {
+      it('should be appended on "document.body" by default', done => {
         const instance = new Backdrop({
           isVisible: true
         })
@@ -246,7 +246,7 @@ describe('Backdrop', () => {
         })
       })
 
-      it('Should find the rootElement if passed as a string', done => {
+      it('should find the rootElement if passed as a string', done => {
         const instance = new Backdrop({
           isVisible: true,
           rootElement: 'body'
@@ -258,7 +258,7 @@ describe('Backdrop', () => {
         })
       })
 
-      it('Should appended on any element given by the proper config', done => {
+      it('should be appended on any element given by the proper config', done => {
         fixtureEl.innerHTML = '<div id="wrapper"></div>'
 
         const wrapper = fixtureEl.querySelector('#wrapper')
@@ -275,7 +275,7 @@ describe('Backdrop', () => {
     })
 
     describe('ClassName', () => {
-      it('Should be able to have different classNames than default', done => {
+      it('should allow configuring className', done => {
         const instance = new Backdrop({
           isVisible: true,
           className: 'foo'