mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-03 06:13:35 +02:00
Force jasmine version to 2.4.1
This commit is contained in:
parent
ca86265731
commit
b95f9bac5e
|
@ -178,7 +178,7 @@ export default class Choices {
|
|||
* @public
|
||||
*/
|
||||
init(callback = this.config.callbackOnInit) {
|
||||
if (this.initialised !== true) {
|
||||
if (this.initialised === false) {
|
||||
// Set initialise flag
|
||||
this.initialised = true;
|
||||
|
||||
|
@ -213,19 +213,23 @@ export default class Choices {
|
|||
* @public
|
||||
*/
|
||||
destroy() {
|
||||
this._removeEventListeners();
|
||||
if (this.initialised === true) {
|
||||
this._removeEventListeners();
|
||||
|
||||
this.passedElement.classList.remove(this.config.classNames.input, this.config.classNames.hiddenState);
|
||||
this.passedElement.tabIndex = '';
|
||||
this.passedElement.removeAttribute('style', 'display:none;');
|
||||
this.passedElement.removeAttribute('aria-hidden');
|
||||
this.passedElement.classList.remove(this.config.classNames.input, this.config.classNames.hiddenState);
|
||||
this.passedElement.tabIndex = '';
|
||||
this.passedElement.removeAttribute('style', 'display:none;');
|
||||
this.passedElement.removeAttribute('aria-hidden');
|
||||
|
||||
this.containerOuter.outerHTML = this.passedElement.outerHTML;
|
||||
this.containerOuter.outerHTML = this.passedElement.outerHTML;
|
||||
|
||||
this.passedElement = null;
|
||||
this.userConfig = null;
|
||||
this.config = null;
|
||||
this.store = null;
|
||||
this.passedElement = null;
|
||||
this.userConfig = null;
|
||||
this.config = null;
|
||||
this.store = null;
|
||||
|
||||
this.initialised = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
"eslint-plugin-import": "^1.13.0",
|
||||
"eslint-plugin-jsx-a11y": "^2.1.0",
|
||||
"eslint-plugin-react": "^6.1.0",
|
||||
"jasmine-core": "^2.4.1",
|
||||
"jasmine-core": "2.4.1",
|
||||
"karma": "^1.1.0",
|
||||
"karma-coverage": "^1.0.0",
|
||||
"karma-es6-shim": "^1.0.0",
|
||||
|
|
|
@ -35,12 +35,9 @@ describe('Choices', function() {
|
|||
})
|
||||
|
||||
it('should have a blank state', function() {
|
||||
const blankState = {
|
||||
items: [],
|
||||
groups: [],
|
||||
choices: [],
|
||||
};
|
||||
expect(this.choices.currentState).toEqual(blankState);
|
||||
expect(this.choices.currentState.items.length).toEqual(0);
|
||||
expect(this.choices.currentState.groups.length).toEqual(0);
|
||||
expect(this.choices.currentState.choices.length).toEqual(0);
|
||||
});
|
||||
|
||||
it('should have config options', function() {
|
||||
|
|
Loading…
Reference in a new issue