mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-07 16:32:32 +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
|
* @public
|
||||||
*/
|
*/
|
||||||
init(callback = this.config.callbackOnInit) {
|
init(callback = this.config.callbackOnInit) {
|
||||||
if (this.initialised !== true) {
|
if (this.initialised === false) {
|
||||||
// Set initialise flag
|
// Set initialise flag
|
||||||
this.initialised = true;
|
this.initialised = true;
|
||||||
|
|
||||||
|
@ -213,6 +213,7 @@ export default class Choices {
|
||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
destroy() {
|
destroy() {
|
||||||
|
if (this.initialised === true) {
|
||||||
this._removeEventListeners();
|
this._removeEventListeners();
|
||||||
|
|
||||||
this.passedElement.classList.remove(this.config.classNames.input, this.config.classNames.hiddenState);
|
this.passedElement.classList.remove(this.config.classNames.input, this.config.classNames.hiddenState);
|
||||||
|
@ -226,6 +227,9 @@ export default class Choices {
|
||||||
this.userConfig = null;
|
this.userConfig = null;
|
||||||
this.config = null;
|
this.config = null;
|
||||||
this.store = null;
|
this.store = null;
|
||||||
|
|
||||||
|
this.initialised = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
"eslint-plugin-import": "^1.13.0",
|
"eslint-plugin-import": "^1.13.0",
|
||||||
"eslint-plugin-jsx-a11y": "^2.1.0",
|
"eslint-plugin-jsx-a11y": "^2.1.0",
|
||||||
"eslint-plugin-react": "^6.1.0",
|
"eslint-plugin-react": "^6.1.0",
|
||||||
"jasmine-core": "^2.4.1",
|
"jasmine-core": "2.4.1",
|
||||||
"karma": "^1.1.0",
|
"karma": "^1.1.0",
|
||||||
"karma-coverage": "^1.0.0",
|
"karma-coverage": "^1.0.0",
|
||||||
"karma-es6-shim": "^1.0.0",
|
"karma-es6-shim": "^1.0.0",
|
||||||
|
|
|
@ -35,12 +35,9 @@ describe('Choices', function() {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('should have a blank state', function() {
|
it('should have a blank state', function() {
|
||||||
const blankState = {
|
expect(this.choices.currentState.items.length).toEqual(0);
|
||||||
items: [],
|
expect(this.choices.currentState.groups.length).toEqual(0);
|
||||||
groups: [],
|
expect(this.choices.currentState.choices.length).toEqual(0);
|
||||||
choices: [],
|
|
||||||
};
|
|
||||||
expect(this.choices.currentState).toEqual(blankState);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have config options', function() {
|
it('should have config options', function() {
|
||||||
|
|
Loading…
Reference in a new issue