Skip to content

Commit

Permalink
one more test | change bundlewatch.config
Browse files Browse the repository at this point in the history
  • Loading branch information
GeoSot committed Apr 14, 2021
1 parent 875e856 commit 7d8dbca
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .bundlewatch.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,23 +34,23 @@
},
{
"path": "./dist/js/bootstrap.bundle.js",
"maxSize": "41 kB"
"maxSize": "41.25 kB"
},
{
"path": "./dist/js/bootstrap.bundle.min.js",
"maxSize": "22 kB"
"maxSize": "22.25 kB"
},
{
"path": "./dist/js/bootstrap.esm.js",
"maxSize": "27 kB"
},
{
"path": "./dist/js/bootstrap.esm.min.js",
"maxSize": "18 kB"
"maxSize": "18.25 kB"
},
{
"path": "./dist/js/bootstrap.js",
"maxSize": "27 kB"
"maxSize": "27.25 kB"
},
{
"path": "./dist/js/bootstrap.min.js",
Expand Down
17 changes: 17 additions & 0 deletions js/tests/unit/util/backdrop.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,23 @@ describe('Backdrop', () => {
})
})

it('if it is not "shown", should not try to remove Node on remove method', done => {
const instance = new Backdrop(false, true)
const elems = () => document.querySelectorAll(CLASS_BACKDROP)
const spy = spyOn(instance, '_remove').and.callThrough()

expect(elems().length).toEqual(0)
expect(instance._isAppended).toEqual(false)
instance.show(() => {
instance.hide(() => {
expect(elems().length).toEqual(0)
expect(spy).not.toHaveBeenCalled()
expect(instance._isAppended).toEqual(false)
done()
})
})
})

describe('click callback', () => {
it('it should execute callback on click', done => {
const spy = jasmine.createSpy('spy')
Expand Down

0 comments on commit 7d8dbca

Please sign in to comment.