aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/tests/unit/base-component.spec.js3
-rw-r--r--js/tests/unit/carousel.spec.js1
-rw-r--r--js/tests/unit/offcanvas.spec.js1
-rw-r--r--js/tests/unit/util/backdrop.spec.js1
-rw-r--r--js/tests/unit/util/index.spec.js1
5 files changed, 7 insertions, 0 deletions
diff --git a/js/tests/unit/base-component.spec.js b/js/tests/unit/base-component.spec.js
index b8ec83f12..fff7cbd1e 100644
--- a/js/tests/unit/base-component.spec.js
+++ b/js/tests/unit/base-component.spec.js
@@ -59,6 +59,7 @@ describe('Base Component', () => {
})
})
})
+
describe('Public Methods', () => {
describe('constructor', () => {
it('should accept element, either passed as a CSS selector or DOM element', () => {
@@ -75,6 +76,7 @@ describe('Base Component', () => {
expect(selectorInstance._element).toEqual(fixtureEl.querySelector('#bar'))
})
})
+
describe('dispose', () => {
it('should dispose an component', () => {
createInstance()
@@ -126,6 +128,7 @@ describe('Base Component', () => {
expect(DummyClass.getInstance(div)).toEqual(null)
})
})
+
describe('getOrCreateInstance', () => {
it('should return an instance', () => {
createInstance()
diff --git a/js/tests/unit/carousel.spec.js b/js/tests/unit/carousel.spec.js
index a933f1eda..2474fbb7d 100644
--- a/js/tests/unit/carousel.spec.js
+++ b/js/tests/unit/carousel.spec.js
@@ -1153,6 +1153,7 @@ describe('Carousel', () => {
})
})
})
+
describe('rtl function', () => {
it('"_directionToOrder" and "_orderToDirection" must return the right results', () => {
fixtureEl.innerHTML = '<div></div>'
diff --git a/js/tests/unit/offcanvas.spec.js b/js/tests/unit/offcanvas.spec.js
index ecbb710a5..e8542ddf6 100644
--- a/js/tests/unit/offcanvas.spec.js
+++ b/js/tests/unit/offcanvas.spec.js
@@ -156,6 +156,7 @@ describe('Offcanvas', () => {
expect(offCanvas._config.scroll).toEqual(false)
})
})
+
describe('options', () => {
it('if scroll is enabled, should allow body to scroll while offcanvas is open', done => {
fixtureEl.innerHTML = '<div class="offcanvas"></div>'
diff --git a/js/tests/unit/util/backdrop.spec.js b/js/tests/unit/util/backdrop.spec.js
index b885b60b5..45c83b1b4 100644
--- a/js/tests/unit/util/backdrop.spec.js
+++ b/js/tests/unit/util/backdrop.spec.js
@@ -230,6 +230,7 @@ describe('Backdrop', () => {
})
})
})
+
describe('Config', () => {
describe('rootElement initialization', () => {
it('Should be appended on "document.body" by default', done => {
diff --git a/js/tests/unit/util/index.spec.js b/js/tests/unit/util/index.spec.js
index 38e94dc6b..9453aaa4d 100644
--- a/js/tests/unit/util/index.spec.js
+++ b/js/tests/unit/util/index.spec.js
@@ -433,6 +433,7 @@ describe('Util', () => {
expect(Util.isDisabled(el('#select'))).toEqual(false)
expect(Util.isDisabled(el('#input'))).toEqual(false)
})
+
it('should return true if the element has disabled attribute', () => {
fixtureEl.innerHTML = [
'<div>',