seiyria / bootstrap-slider

A slider control for Bootstrap 3 & 4.
http://seiyria.github.io/bootstrap-slider/
Other
3k stars 1.14k forks source link

Error: doesn't destory the silder instance cause "generates mutiple silder instance" test failed #887

Closed xwang345 closed 5 years ago

xwang345 commented 5 years ago

Hi,

I find this bug will effect on test 'formatter' option properly will be failed.

https://github.com/seiyria/bootstrap-slider/blob/9674de904e28b275269609d1a3e837f39c389a83/test/specs/PublicMethodsSpec.js#L16

The problem is when create a new slider instance the unit test code doesn't destroy it, and keep the old value pass to the 'formatter' option test that cause test failed.

Issues

NOTE: Before filing a new issue, please search through the open issues list and check to see if an existing issue already exists that describes your problem. If so, leave a comment within that issue with the checklist items described below.

Please make sure you include the following in your issue report where appropriate: