'));
- view.el.querySelector('#inputs').innerHTML.should.not.be.empty;
- (view.model.get('props') === null).should.equal(true);
- });
+ it('Changes on value trigger onPreview', () => {
+ var called = 0;
+ view.onPreview = () => {called = 1};
+ view.model.set('preview', true);
+ view.model.set('value', 'test');
+ expect(called).toEqual(1);
+ });
+ it('Update props', () => {
+ view.model.set('props', $('
'));
+ expect(view.el.querySelector('#inputs').innerHTML).toExist();
+ expect(view.model.get('props')).toEqual(null);
});
- }
- };
-});
\ No newline at end of file
+ });
+ }
+};
diff --git a/test/specs/style_manager/view/PropertyColorView.js b/test/specs/style_manager/view/PropertyColorView.js
index f674503cd..8d441ebf3 100644
--- a/test/specs/style_manager/view/PropertyColorView.js
+++ b/test/specs/style_manager/view/PropertyColorView.js
@@ -1,166 +1,166 @@
-define(function(require, exports, module){
- 'use strict';
- var PropertyColorView = require('undefined');
- var Property = require('StyleManager/model/Property');
- var Component = require('DomComponents/model/Component');
-
- module.exports = {
- run : function(){
-
- describe('PropertyColorView', function() {
-
- var component;
- var $fixtures;
- var $fixture;
- var target;
- var model;
- var view;
- var propName = 'testprop';
- var propValue = '#fff';
- var defValue = 'test2value';
-
- before(function () {
- $.fn.spectrum = function(){};
- $fixtures = $("#fixtures");
- $fixture = $('
');
- });
+const PropertyColorView = require('style_manager/view/PropertyColorView');
+const Property = require('style_manager/model/Property');
+const Component = require('dom_components/model/Component');
+
+module.exports = {
+ run() {
+
+ describe('PropertyColorView', () => {
+
+ var component;
+ var $fixtures;
+ var $fixture;
+ var target;
+ var model;
+ var view;
+ var propTarget;
+ var propName = 'testprop';
+ var propValue = '#fff';
+ var defValue = 'test2value';
+
+ before(() => {
+ $.fn.spectrum = () => {};
+ $fixtures = $("#fixtures");
+ $fixture = $('
');
+ });
- beforeEach(function () {
- target = new Component();
- component = new Component();
- model = new Property({
- type: 'color',
- property: propName
- });
- view = new PropertyColorView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
+ beforeEach(() => {
+ target = new Component();
+ component = new Component();
+ model = new Property({
+ type: 'color',
+ property: propName
+ });
+ propTarget = Object.assign({}, Backbone.Events);
+ propTarget.model = component;
+ view = new PropertyColorView({
+ model,
+ propTarget
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
- afterEach(function () {
- //view.remove(); // strange errors ???
- });
+ afterEach(() => {
+ //view.remove(); // strange errors ???
+ });
- after(function () {
- $fixture.remove();
- delete component;
- delete view;
- delete model;
- });
+ after(() => {
+ $fixture.remove();
+ component = null;
+ view = null;
+ model = null;
+ });
- it('Rendered correctly', function() {
- var prop = view.el;
- $fixture.get(0).querySelector('.property').should.be.ok;
- prop.querySelector('.label').should.be.ok;
- prop.querySelector('.field').should.be.ok;
- });
+ it('Rendered correctly', () => {
+ var prop = view.el;
+ expect($fixture.get(0).querySelector('.property')).toExist();
+ expect(prop.querySelector('.label')).toExist();
+ expect(prop.querySelector('.field')).toExist();
+ });
- it('Inputs rendered', function() {
- var prop = view.el;
- prop.querySelector('input[type=text]').should.be.ok;
- prop.querySelector('.field-color-picker').should.be.ok;
- });
+ it('Inputs rendered', () => {
+ var prop = view.el;
+ expect(prop.querySelector('input[type=text]')).toExist();
+ expect(prop.querySelector('.field-color-picker')).toExist();
+ });
- it('Inputs should exist', function() {
- view.$input.should.be.ok;
- view.$color.should.be.ok;
- });
+ it('Inputs should exist', () => {
+ expect(view.$input).toExist();
+ expect(view.$color).toExist();
+ });
- it('Input value is empty', function() {
- view.model.get('value').should.be.empty;
- view.$input.val().should.be.empty;
- });
+ it('Input value is empty', () => {
+ expect(view.model.get('value')).toNotExist();
+ expect(view.$input.val()).toNotExist();
+ });
- it('Update model on setValue', function() {
- view.setValue(propValue);
- view.model.get('value').should.equal(propValue);
- view.$input.val().should.equal(propValue);
- });
+ it('Update model on setValue', () => {
+ view.setValue(propValue);
+ expect(view.model.get('value')).toEqual(propValue);
+ expect(view.$input.val()).toEqual(propValue);
+ });
- it('Update model on input change', function() {
- view.$input.val(propValue).trigger('change');
- view.model.get('value').should.equal(propValue);
- });
+ it('Update model on input change', () => {
+ view.$input.val(propValue).trigger('change');
+ expect(view.model.get('value')).toEqual(propValue);
+ });
- it('Update input on value change', function() {
- view.model.set('value', propValue);
- view.getInputValue().should.equal(propValue);
- });
+ it('Update input on value change', () => {
+ view.model.set('value', propValue);
+ expect(view.getInputValue()).toEqual(propValue);
+ });
- it('Update target on value change', function() {
- view.selectedComponent = component;
- view.model.set('value', propValue);
- var compStyle = view.selectedComponent.get('style');
- var assertStyle = {};
- assertStyle[propName] = propValue;
- compStyle.should.deep.equal(assertStyle);
- });
+ it('Update target on value change', () => {
+ view.selectedComponent = component;
+ view.model.set('value', propValue);
+ var compStyle = view.selectedComponent.get('style');
+ var assertStyle = {};
+ assertStyle[propName] = propValue;
+ expect(compStyle).toEqual(assertStyle);
+ });
- describe('With target setted', function() {
-
- beforeEach(function () {
- target.model = component;
- view = new PropertyColorView({
- model: model,
- propTarget: target
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
-
- it('Update value and input on target swap', function() {
- var style = {};
- style[propName] = propValue;
- component.set('style', style);
- view.propTarget.trigger('update');
- view.model.get('value').should.equal(propValue);
- view.getInputValue().should.equal(propValue);
- });
-
- it('Update value after multiple swaps', function() {
- var style = {};
- style[propName] = propValue;
- component.set('style', style);
- view.propTarget.trigger('update');
- style[propName] = '#123123';
- component.set('style', style);
- view.propTarget.trigger('update');
- view.model.get('value').should.equal('#123123');
- view.$input.val().should.equal('#123123');
- });
-
- })
-
- describe('Init property', function() {
-
- beforeEach(function () {
- component = new Component();
- model = new Property({
- type: 'color',
- property: propName,
- defaults: propValue,
- });
- view = new PropertyColorView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
-
- it('Value as default', function() {
- view.model.get('value').should.equal(propValue);
- });
-
- it('Input value is as default', function() {
- view.$input.val().should.equal(propValue);
- });
+ describe('With target setted', () => {
+ beforeEach(() => {
+ target.model = component;
+ view = new PropertyColorView({
+ model,
+ propTarget: target
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
+
+ it('Update value and input on target swap', () => {
+ var style = {};
+ style[propName] = propValue;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ expect(view.model.get('value')).toEqual(propValue);
+ expect(view.getInputValue()).toEqual(propValue);
+ });
+
+ it('Update value after multiple swaps', () => {
+ var style = {};
+ style[propName] = propValue;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ style[propName] = '#123123';
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ expect(view.model.get('value')).toEqual('#123123');
+ expect(view.getInputValue()).toEqual('#123123');
+ });
+
+ })
+
+ describe('Init property', () => {
+
+ beforeEach(() => {
+ component = new Component();
+ model = new Property({
+ type: 'color',
+ property: propName,
+ defaults: propValue,
});
+ view = new PropertyColorView({
+ model
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
+
+ it('Value as default', () => {
+ expect(view.model.get('value')).toEqual(propValue);
+ });
+
+ it('Input value is as default', () => {
+ expect(view.$input.val()).toEqual(propValue);
+ });
});
- }
- };
-});
\ No newline at end of file
+ });
+ }
+};
diff --git a/test/specs/style_manager/view/PropertyCompositeView.js b/test/specs/style_manager/view/PropertyCompositeView.js
index bd6bd778e..c64b77000 100644
--- a/test/specs/style_manager/view/PropertyCompositeView.js
+++ b/test/specs/style_manager/view/PropertyCompositeView.js
@@ -1,242 +1,238 @@
-define(function(require, exports, module){
- 'use strict';
- var PropertyCompositeView = require('undefined');
- var Property = require('StyleManager/model/Property');
- var Component = require('DomComponents/model/Component');
-
- module.exports = {
- run : function(){
-
- describe('PropertyCompositeView', function() {
-
- var component;
- var $fixtures;
- var $fixture;
- var target;
- var model;
- var view;
- var propName = 'testprop';
- var propValue = 'test1value';
- var defValue = 'test2value';
- var properties = [
- {property: 'subprop1'},
- {
- type: 'integer',
- property: 'subprop2',
- defaults: 0,
- units: ['%', 'px']
- },
- {
- type: 'select',
- property: 'subprop3',
- defaults: 'val2',
- list: [
- {value:'val1'},
- {value:'val2'},
- {value:'val3'},
- ]
- },
- ];
-
- before(function () {
- $fixtures = $("#fixtures");
- $fixture = $('
');
- });
-
- beforeEach(function () {
- target = new Component();
- component = new Component();
- target.model = component;
- model = new Property({
- type: 'composite',
- property: propName,
- properties: properties
- });
- view = new PropertyCompositeView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
+const PropertyCompositeView = require('style_manager/view/PropertyCompositeView');
+const Property = require('style_manager/model/Property');
+const Component = require('dom_components/model/Component');
+
+module.exports = {
+ run() {
+
+ describe('PropertyCompositeView', () => {
+
+ var component;
+ var $fixtures;
+ var $fixture;
+ var target;
+ var model;
+ var view;
+ var propName = 'testprop';
+ var propValue = 'test1value';
+ var defValue = 'test2value';
+ var properties = [
+ {property: 'subprop1'},
+ {
+ type: 'integer',
+ property: 'subprop2',
+ defaults: 0,
+ units: ['%', 'px']
+ },
+ {
+ type: 'select',
+ property: 'subprop3',
+ defaults: 'val2',
+ list: [
+ {value:'val1'},
+ {value:'val2'},
+ {value:'val3'},
+ ]
+ },
+ ];
+
+ before(() => {
+ $fixtures = $("#fixtures");
+ $fixture = $('
');
+ });
- afterEach(function () {
- //view.remove(); // strange errors ???
- });
+ beforeEach(() => {
+ target = new Component();
+ component = new Component();
+ target.model = component;
+ model = new Property({
+ type: 'composite',
+ property: propName,
+ properties
+ });
+ view = new PropertyCompositeView({
+ model
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
- after(function () {
- $fixture.remove();
- delete component;
- delete view;
- delete model;
- });
+ afterEach(() => {
+ //view.remove(); // strange errors ???
+ });
- it('Rendered correctly', function() {
- var prop = view.el;
- $fixture.get(0).querySelector('.property').should.be.ok;
- prop.querySelector('.label').should.be.ok;
- prop.querySelector('.field').should.be.ok;
- });
+ after(() => {
+ $fixture.remove();
+ component = null;
+ view = null;
+ model = null;
+ });
- it('Properties rendered', function() {
- var prop = view.el;
- prop.querySelector('.properties').should.be.ok;
- });
+ it('Rendered correctly', () => {
+ var prop = view.el;
+ expect($fixture.get(0).querySelector('.property')).toExist();
+ expect(prop.querySelector('.label')).toExist();
+ expect(prop.querySelector('.field')).toExist();
+ });
- it('Properties rendered correctly', function() {
- var children = view.el.querySelector('.properties').children;
- children.length.should.equal(properties.length + 1);
- children[0].id.should.equal(properties[0].property);
- children[1].id.should.equal(properties[1].property);
- children[2].id.should.equal(properties[2].property);
- });
+ it('Properties rendered', () => {
+ var prop = view.el;
+ expect(prop.querySelector('.properties')).toExist();
+ });
- it('Props should exist', function() {
- view.$props.should.be.ok;
- });
+ it('Properties rendered correctly', () => {
+ var children = view.el.querySelector('.properties').children;
+ expect(children.length).toEqual(properties.length + 1);
+ expect(children[0].id).toEqual(properties[0].property);
+ expect(children[1].id).toEqual(properties[1].property);
+ expect(children[2].id).toEqual(properties[2].property);
+ });
- it('Input value is empty', function() {
- view.model.get('value').should.be.empty;
- });
+ it('Props should exist', () => {
+ expect(view.$props).toExist();
+ });
- it('Update input on value change', function() {
- view.model.set('value', propValue);
- view.$input.val().should.equal(propValue);
- });
+ it('Input value is empty', () => {
+ expect(view.model.get('value')).toNotExist();
+ });
- describe('With target setted', function() {
-
- var prop2Val;
- var prop3Val;
- var prop2Unit;
- var finalResult;
- var $prop1;
- var $prop2;
- var $prop3;
-
- beforeEach(function () {
- model = new Property({
- type: 'composite',
- property: propName,
- properties: properties
- });
- view = new PropertyCompositeView({
- model: model,
- propTarget: target
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- prop3Val = properties[2].list[2].value;
- prop2Val = properties[1].defaults;
- prop2Unit = properties[1].units[0];
- finalResult = propValue + ' ' + prop2Val + prop2Unit +' ' + prop3Val;
- $prop1 = view.$props.find('#' + properties[0].property + ' input');
- $prop2 = view.$props.find('#' + properties[1].property + ' input');
- $prop3 = view.$props.find('#' + properties[2].property + ' select');
- });
-
- it('Update model on input change', function() {
- $prop1.val(propValue).trigger('change');
- $prop3.val(prop3Val).trigger('change');
- view.model.get('value').should.equal(finalResult);
- });
-
- it('Update value on models change', function() {
- view.model.get('properties').at(0).set('value', propValue);
- view.model.get('properties').at(2).set('value', prop3Val);
- view.model.get('value').should.equal(finalResult);
- });
-
- it('Update target on value change', function() {
- $prop1.val(propValue).trigger('change');
- var compStyle = view.getTarget().get('style');
- var assertStyle = {};
- assertStyle[propName] = propValue + ' 0% val2';
- compStyle.should.deep.equal(assertStyle);
- });
-
- it('Update target on detached value change', function() {
- model = new Property({
- type: 'composite',
- property: propName,
- properties: properties,
- detached: true,
- });
- view = new PropertyCompositeView({
- model: model,
- propTarget: target
- });
- $fixture.html(view.render().el);
- $prop1 = view.$props.find('#' + properties[0].property + ' input');
- $prop1.val(propValue).trigger('change');
- var compStyle = view.getTarget().get('style');
- var assertStyle = {};
- assertStyle[properties[0].property] = $prop1.val();
- compStyle.should.deep.equal(assertStyle);
- });
-
- it('Update value and input on target swap', function() {
- var style = {};
- style[propName] = finalResult;
- component.set('style', style);
- view.propTarget.trigger('update');
- $prop1.val().should.equal(propValue);
- $prop3.val().should.equal(prop3Val);
- });
-
- it('Update value after multiple swaps', function() {
- var style = {};
- style[propName] = finalResult;
- component.set('style', style);
- view.propTarget.trigger('update');
- style[propName] = propValue + '2 ' + prop2Val + '2' + prop2Unit + ' ' + 'val1';
- component.set('style', style);
- view.propTarget.trigger('update');
- $prop1.val().should.equal(propValue + '2');
- $prop2.val().should.equal('2');
- $prop3.val().should.equal('val1');
- });
-
- it('The value is correctly extracted from the composite string', function() {
- var style = {};
- style[propName] = 'value1 value2 value3 value4';
- component.set('style', style);
- view.valueOnIndex(2).should.equal('value3');
- view.valueOnIndex(0).should.equal('value1');
- (view.valueOnIndex(4) === null).should.equal(true);
- });
-
- it('Build value from properties', function() {
- view.model.get('properties').at(0).set('value', propValue);
- view.model.get('properties').at(2).set('value', prop3Val);
- view.build().should.equal(finalResult);
- });
-
- })
-
- describe('Init property', function() {
-
- beforeEach(function () {
- model = new Property({
- type: 'composite',
- property: propName,
- properties: properties,
- defaults: defValue,
- });
- view = new PropertyCompositeView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
-
- it('Value as default', function() {
- view.model.get('value').should.equal(defValue);
- });
+ it('Update input on value change', () => {
+ view.model.set('value', propValue);
+ expect(view.$input.val()).toEqual(propValue);
+ });
+ describe('With target setted', () => {
+
+ var prop2Val;
+ var prop3Val;
+ var prop2Unit;
+ var finalResult;
+ var $prop1;
+ var $prop2;
+ var $prop3;
+
+ beforeEach(() => {
+ model = new Property({
+ type: 'composite',
+ property: propName,
+ properties
});
+ view = new PropertyCompositeView({
+ model,
+ propTarget: target
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ prop3Val = properties[2].list[2].value;
+ prop2Val = properties[1].defaults;
+ prop2Unit = properties[1].units[0];
+ finalResult = propValue + ' ' + prop2Val + prop2Unit +' ' + prop3Val;
+ $prop1 = view.$props.find('#' + properties[0].property + ' input');
+ $prop2 = view.$props.find('#' + properties[1].property + ' input');
+ $prop3 = view.$props.find('#' + properties[2].property + ' select');
+ });
+
+ it('Update model on input change', () => {
+ $prop1.val(propValue).trigger('change');
+ $prop3.val(prop3Val).trigger('change');
+ expect(view.model.get('value')).toEqual(finalResult);
+ });
+
+ it('Update value on models change', () => {
+ view.model.get('properties').at(0).set('value', propValue);
+ view.model.get('properties').at(2).set('value', prop3Val);
+ expect(view.model.get('value')).toEqual(finalResult);
+ });
+
+ it('Update target on value change', () => {
+ $prop1.val(propValue).trigger('change');
+ var compStyle = view.getTarget().get('style');
+ var assertStyle = {};
+ assertStyle[propName] = propValue + ' 0% val2';
+ expect(compStyle).toEqual(assertStyle);
+ });
+
+ it('Update target on detached value change', () => {
+ model = new Property({
+ type: 'composite',
+ property: propName,
+ properties,
+ detached: true,
+ });
+ view = new PropertyCompositeView({
+ model,
+ propTarget: target
+ });
+ $fixture.html(view.render().el);
+ $prop1 = view.$props.find('#' + properties[0].property + ' input');
+ $prop1.val(propValue).trigger('change');
+ var compStyle = view.getTarget().get('style');
+ var assertStyle = {};
+ assertStyle[properties[0].property] = $prop1.val();
+ expect(compStyle).toEqual(assertStyle);
+ });
+
+ it('Update value and input on target swap', () => {
+ var style = {};
+ style[propName] = finalResult;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ expect($prop1.val()).toEqual(propValue);
+ expect($prop3.val()).toEqual(prop3Val);
+ });
+
+ it('Update value after multiple swaps', () => {
+ var style = {};
+ style[propName] = finalResult;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ style[propName] = propValue + '2 ' + prop2Val + '2' + prop2Unit + ' ' + 'val1';
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ expect($prop1.val()).toEqual(propValue + '2');
+ expect($prop2.val()).toEqual('2');
+ expect($prop3.val()).toEqual('val1');
+ });
+
+ it('The value is correctly extracted from the composite string', () => {
+ var style = {};
+ style[propName] = 'value1 value2 value3 value4';
+ component.set('style', style);
+ expect(view.valueOnIndex(2)).toEqual('value3');
+ expect(view.valueOnIndex(0)).toEqual('value1');
+ expect(view.valueOnIndex(4)).toEqual(null);
+ });
+
+ it('Build value from properties', () => {
+ view.model.get('properties').at(0).set('value', propValue);
+ view.model.get('properties').at(2).set('value', prop3Val);
+ expect(view.build()).toEqual(finalResult);
+ });
+
+ })
+
+ describe('Init property', () => {
+
+ beforeEach(() => {
+ model = new Property({
+ type: 'composite',
+ property: propName,
+ properties,
+ defaults: defValue,
+ });
+ view = new PropertyCompositeView({
+ model
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
+
+ it('Value as default', () => {
+ expect(view.model.get('value')).toEqual(defValue);
+ });
});
- }
- };
-});
\ No newline at end of file
+ });
+ }
+};
diff --git a/test/specs/style_manager/view/PropertyIntegerView.js b/test/specs/style_manager/view/PropertyIntegerView.js
index 93e077959..14e6e0716 100644
--- a/test/specs/style_manager/view/PropertyIntegerView.js
+++ b/test/specs/style_manager/view/PropertyIntegerView.js
@@ -1,211 +1,211 @@
-define(function(require, exports, module){
- 'use strict';
- var PropertyIntegerView = require('undefined');
- var Property = require('StyleManager/model/Property');
- var Component = require('DomComponents/model/Component');
-
- module.exports = {
- run : function(){
-
- describe('PropertyIntegerView', function() {
-
- var component;
- var $fixtures;
- var $fixture;
- var target;
- var model;
- var view;
- var propName = 'testprop';
- var intValue = '55';
- var unitValue = 'px';
- var propValue = intValue + unitValue;
- var defValue = 'test2value';
- var units = ['px', '%', 'em'];
- var minValue = -15;
- var maxValue = 75;
- var unitsElSel = '.field-units select';
-
- before(function () {
- $fixtures = $("#fixtures");
- $fixture = $('
');
- });
-
- beforeEach(function () {
- target = new Component();
- component = new Component();
- model = new Property({
- type: 'integer',
- units: units,
- property: propName
- });
- view = new PropertyIntegerView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
+const PropertyIntegerView = require('style_manager/view/PropertyIntegerView');
+const Property = require('style_manager/model/Property');
+const Component = require('dom_components/model/Component');
+
+module.exports = {
+ run() {
+
+ describe('PropertyIntegerView', () => {
+
+ var component;
+ var $fixtures;
+ var $fixture;
+ var target;
+ var model;
+ var view;
+ var propTarget;
+ var propName = 'testprop';
+ var intValue = '55';
+ var unitValue = 'px';
+ var propValue = intValue + unitValue;
+ var defValue = 'test2value';
+ var units = ['px', '%', 'em'];
+ var minValue = -15;
+ var maxValue = 75;
+ var unitsElSel = '.field-units select';
+
+ before(() => {
+ $fixtures = $("#fixtures");
+ $fixture = $('
');
+ });
- afterEach(function () {
- //view.remove(); // strange errors ???
- });
+ beforeEach(() => {
+ target = new Component();
+ component = new Component();
+ model = new Property({
+ type: 'integer',
+ units,
+ property: propName
+ });
+ propTarget = Object.assign({}, Backbone.Events);
+ propTarget.model = component;
+ view = new PropertyIntegerView({
+ model,
+ propTarget
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
- after(function () {
- $fixture.remove();
- delete component;
- delete view;
- delete model;
- });
+ afterEach(() => {
+ //view.remove(); // strange errors ???
+ });
- it('Rendered correctly', function() {
- var prop = view.el;
- $fixture.get(0).querySelector('.property').should.be.ok;
- prop.querySelector('.label').should.be.ok;
- prop.querySelector('.field').should.be.ok;
- });
+ after(() => {
+ $fixture.remove();
+ component = null;
+ view = null;
+ model = null;
+ });
- it('Inputs rendered', function() {
- var prop = view.el;
- prop.querySelector('input[type=text]').should.be.ok;
- prop.querySelector(unitsElSel).should.be.ok;
- });
+ it('Rendered correctly', () => {
+ var prop = view.el;
+ expect($fixture.get(0).querySelector('.property')).toExist();
+ expect(prop.querySelector('.label')).toExist();
+ expect(prop.querySelector('.field')).toExist();
+ });
- it('Units rendered', function() {
- var select = view.el.querySelector(unitsElSel);
- select.children.length.should.equal(units.length);
- });
+ it('Inputs rendered', () => {
+ var prop = view.el;
+ expect(prop.querySelector('input[type=text]')).toExist();
+ expect(prop.querySelector(unitsElSel)).toExist();
+ });
- it('Units rendered correctly', function() {
- var children = view.el.querySelector(unitsElSel).children;
- children[0].textContent.should.equal(units[0]);
- children[1].textContent.should.equal(units[1]);
- children[2].textContent.should.equal(units[2]);
- });
+ it('Units rendered', () => {
+ var select = view.el.querySelector(unitsElSel);
+ expect(select.children.length).toEqual(units.length);
+ });
- it('Inputs should exist', function() {
- view.$input.should.be.ok;
- view.$unit.should.be.ok;
- });
+ it('Units rendered correctly', () => {
+ var children = view.el.querySelector(unitsElSel).children;
+ expect(children[0].textContent).toEqual(units[0]);
+ expect(children[1].textContent).toEqual(units[1]);
+ expect(children[2].textContent).toEqual(units[2]);
+ });
- it('Input value is empty', function() {
- view.model.get('value').should.be.empty;
- view.model.get('unit').should.equal('px');
- });
+ it('Inputs should exist', () => {
+ expect(view.$input).toExist();
+ expect(view.$unit).toExist();
+ });
- it('Update model on setValue', function() {
- view.setValue(intValue + unitValue);
- view.model.get('value').should.equal(parseFloat(intValue));
- view.model.get('unit').should.equal(unitValue);
- view.$input.val().should.equal(intValue);
- view.$unit.val().should.equal(unitValue);
- });
+ it('Input value is empty', () => {
+ expect(view.model.get('value')).toNotExist();
+ expect(view.model.get('unit')).toEqual('px');
+ });
- it('Update model on input change', function() {
- view.$input.val(123).trigger('change');
- view.model.get('value').should.equal(123);
- });
+ it('Update model on setValue', () => {
+ view.setValue(intValue + unitValue);
+ expect(view.model.get('value')).toEqual(parseFloat(intValue));
+ expect(view.model.get('unit')).toEqual(unitValue);
+ expect(view.$input.val()).toEqual(intValue);
+ expect(view.$unit.val()).toEqual(unitValue);
+ });
- it('Update model on unit change', function() {
- view.$unit.val(units[1]).trigger('change');
- view.model.get('unit').should.equal(units[1]);
- });
+ it('Update model on input change', () => {
+ view.$input.val(123).trigger('change');
+ expect(view.model.get('value')).toEqual(123);
+ });
- it('Update input on value change', function() {
- view.model.set('value', intValue);
- view.getInputValue().should.equal(intValue);
- });
+ it('Update model on unit change', () => {
+ view.$unit.val(units[1]).trigger('change');
+ expect(view.model.get('unit')).toEqual(units[1]);
+ });
- it('Update target on value change', function() {
- view.selectedComponent = component;
- view.model.set('value', intValue);
- var compStyle = view.selectedComponent.get('style');
- var assertStyle = {};
- assertStyle[propName] = propValue;
- compStyle.should.deep.equal(assertStyle);
- });
+ it('Update input on value change', () => {
+ view.model.set('value', intValue);
+ expect(view.getInputValue()).toEqual(intValue);
+ });
- describe('With target setted', function() {
-
- beforeEach(function () {
- target.model = component;
- view = new PropertyIntegerView({
- model: model,
- propTarget: target
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
-
- it('Update value and input on target swap', function() {
- var style = {};
- style[propName] = propValue;
- component.set('style', style);
- view.propTarget.trigger('update');
- view.model.get('value').should.equal(parseFloat(intValue));
- view.getInputValue().should.equal(intValue);
- });
-
- it('Update value after multiple swaps', function() {
- var style = {};
- style[propName] = propValue;
- component.set('style', style);
- view.propTarget.trigger('update');
- style[propName] = '20em';
- component.set('style', style);
- view.propTarget.trigger('update');
- view.model.get('value').should.equal(20);
- view.model.get('unit').should.equal('em');
- view.$input.val().should.equal('20');
- view.$unit.val().should.equal('em');
- });
-
- })
-
- describe('Init property', function() {
-
- beforeEach(function () {
- component = new Component();
- model = new Property({
- type: 'integer',
- units: units,
- property: propName,
- defaults: intValue,
- min: minValue,
- max: maxValue,
- unit: units[1],
- });
- view = new PropertyIntegerView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
-
- it('Value as default', function() {
- view.model.get('value').should.equal(parseInt(intValue));
- view.model.get('unit').should.equal(units[1]);
- });
-
- it('Input value is as default', function() {
- view.$input.val().should.equal(intValue);
- view.$unit.val().should.equal(units[1]);
- });
-
- it('Input follows min', function() {
- view.$input.val(minValue - 50).trigger('change');
- view.model.get('value').should.equal(minValue);
- view.$input.val().should.equal(minValue + "");
- });
-
- it('Input follows max', function() {
- view.$input.val(maxValue + 50).trigger('change');
- view.model.get('value').should.equal(maxValue);
- view.$input.val().should.equal(maxValue + "");
- });
+ it('Update target on value change', () => {
+ view.selectedComponent = component;
+ view.model.set('value', intValue);
+ var compStyle = view.selectedComponent.get('style');
+ var assertStyle = {};
+ assertStyle[propName] = propValue;
+ expect(compStyle).toEqual(assertStyle);
+ });
- });
+ describe('With target setted', () => {
+
+ beforeEach(() => {
+ target.model = component;
+ view = new PropertyIntegerView({
+ model,
+ propTarget: target
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
+
+ it('Update value and input on target swap', () => {
+ var style = {};
+ style[propName] = propValue;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ expect(view.model.get('value')).toEqual(parseFloat(intValue));
+ expect(view.getInputValue()).toEqual(intValue);
+ });
+
+ it('Update value after multiple swaps', () => {
+ var style = {};
+ style[propName] = propValue;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ style[propName] = '20em';
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ expect(view.model.get('value')).toEqual(20);
+ expect(view.model.get('unit')).toEqual('em');
+ expect(view.$input.val()).toEqual('20');
+ expect(view.$unit.val()).toEqual('em');
+ });
+
+ })
+
+ describe('Init property', () => {
+
+ beforeEach(() => {
+ component = new Component();
+ model = new Property({
+ type: 'integer',
+ units,
+ property: propName,
+ defaults: intValue,
+ min: minValue,
+ max: maxValue,
+ unit: units[1],
+ });
+ view = new PropertyIntegerView({
+ model
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
+
+ it('Value as default', () => {
+ expect(view.model.get('value')).toEqual(parseInt(intValue));
+ expect(view.model.get('unit')).toEqual(units[1]);
+ });
+
+ it('Input value is as default', () => {
+ expect(view.$input.val()).toEqual(intValue);
+ expect(view.$unit.val()).toEqual(units[1]);
+ });
+
+ it('Input follows min', () => {
+ view.$input.val(minValue - 50).trigger('change');
+ expect(view.model.get('value')).toEqual(minValue);
+ expect(view.$input.val()).toEqual(minValue + "");
+ });
+
+ it('Input follows max', () => {
+ view.$input.val(maxValue + 50).trigger('change');
+ expect(view.model.get('value')).toEqual(maxValue);
+ expect(view.$input.val()).toEqual(maxValue + "");
+ });
});
- }
- };
-});
\ No newline at end of file
+ });
+ }
+};
diff --git a/test/specs/style_manager/view/PropertyRadioView.js b/test/specs/style_manager/view/PropertyRadioView.js
index 0370b75fa..38d4b5de5 100644
--- a/test/specs/style_manager/view/PropertyRadioView.js
+++ b/test/specs/style_manager/view/PropertyRadioView.js
@@ -1,177 +1,176 @@
-define(function(require, exports, module){
- 'use strict';
- var PropertyRadioView = require('undefined');
- var Property = require('StyleManager/model/Property');
- var Component = require('DomComponents/model/Component');
-
- module.exports = {
- run : function(){
-
- describe('PropertyRadioView', function() {
-
- var component;
- var $fixtures;
- var $fixture;
- var target;
- var model;
- var view;
- var propName = 'testprop';
- var propValue = 'test1value';
- var defValue = 'test2value';
- var options = [
- { value: 'test1value', 'title': 'testtitle'},
- { name: 'test2', value: 'test2value'}
- ];
-
- before(function () {
- $fixtures = $("#fixtures");
- $fixture = $('
');
- });
+const PropertyRadioView = require('style_manager/view/PropertyRadioView');
+const Property = require('style_manager/model/Property');
+const Component = require('dom_components/model/Component');
+
+module.exports = {
+ run() {
+
+ describe('PropertyRadioView', () => {
+
+ var component;
+ var $fixtures;
+ var $fixture;
+ var target;
+ var model;
+ var view;
+ var propTarget;
+ var propName = 'testprop';
+ var propValue = 'test1value';
+ var defValue = 'test2value';
+ var options = [
+ { value: 'test1value', 'title': 'testtitle'},
+ { name: 'test2', value: 'test2value'}
+ ];
+
+ before(() => {
+ $fixtures = $("#fixtures");
+ $fixture = $('
');
+ });
- beforeEach(function () {
- target = new Component();
- component = new Component();
- model = new Property({
- type: 'radio',
- list: options,
- property: propName
- });
- view = new PropertyRadioView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
+ beforeEach(() => {
+ target = new Component();
+ component = new Component();
+ model = new Property({
+ type: 'radio',
+ list: options,
+ property: propName
+ });
+ propTarget = Object.assign({}, Backbone.Events);
+ propTarget.model = component;
+ view = new PropertyRadioView({
+ model,
+ propTarget
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
- afterEach(function () {
- //view.remove(); // strange errors ???
- });
+ afterEach(() => {
+ //view.remove(); // strange errors ???
+ });
- after(function () {
- $fixture.remove();
- delete component;
- });
+ after(() => {
+ $fixture.remove();
+ component = null;
+ });
- it('Rendered correctly', function() {
- var prop = view.el;
- $fixture.get(0).querySelector('.property').should.be.ok;
- prop.querySelector('.label').should.be.ok;
- prop.querySelector('.field').should.be.ok;
- });
+ it('Rendered correctly', () => {
+ var prop = view.el;
+ expect($fixture.get(0).querySelector('.property')).toExist();
+ expect(prop.querySelector('.label')).toExist();
+ expect(prop.querySelector('.field')).toExist();
+ });
- it('Radio rendered', function() {
- var prop = view.el;
- prop.querySelector('input[type=radio]').should.be.ok;
- });
+ it('Radio rendered', () => {
+ var prop = view.el;
+ expect(prop.querySelector('input[type=radio]')).toExist();
+ });
- it('Options rendered', function() {
- var input = view.el.querySelector('#input-holder');
- input.children.length.should.equal(options.length);
- });
+ it('Options rendered', () => {
+ var input = view.el.querySelector('#input-holder');
+ expect(input.children.length).toEqual(options.length);
+ });
- it('Options rendered correctly', function() {
- var children = view.el.querySelector('#input-holder').children;
- children[0].querySelector('label').textContent.should.equal('test1value');
- children[1].querySelector('label').textContent.should.equal('test2');
- children[0].querySelector('input').value.should.equal(options[0].value);
- children[1].querySelector('input').value.should.equal(options[1].value);
- children[0].querySelector('label').getAttribute('title').should.equal(options[0].title);
- (children[1].querySelector('label').getAttribute('title') == null)
- .should.equal(true);
- });
+ it('Options rendered correctly', () => {
+ var children = view.el.querySelector('#input-holder').children;
+ expect(children[0].querySelector('label').textContent).toEqual('test1value');
+ expect(children[1].querySelector('label').textContent).toEqual('test2');
+ expect(children[0].querySelector('input').value).toEqual(options[0].value);
+ expect(children[1].querySelector('input').value).toEqual(options[1].value);
+ expect(children[0].querySelector('label').getAttribute('title')).toEqual(options[0].title);
+ expect(children[1].querySelector('label').getAttribute('title')).toEqual(null);
+ });
- it('Input should exist', function() {
- view.$input.should.be.ok;
- });
+ it('Input should exist', () => {
+ expect(view.$input).toExist();
+ });
- it('Input value is empty', function() {
- view.model.get('value').should.be.empty;
- });
+ it('Input value is empty', () => {
+ expect(view.model.get('value')).toNotExist();
+ });
- it('Update model on input change', function() {
- view.setValue(propValue);
- view.model.get('value').should.equal(propValue);
- view.getInputValue().should.equal(propValue);
- });
+ it('Update model on input change', () => {
+ view.setValue(propValue);
+ expect(view.model.get('value')).toEqual(propValue);
+ expect(view.getInputValue()).toEqual(propValue);
+ });
- it('Update input on value change', function() {
- view.model.set('value', propValue);
- view.getInputValue().should.equal(propValue);
- });
+ it('Update input on value change', () => {
+ view.model.set('value', propValue);
+ expect(view.getInputValue()).toEqual(propValue);
+ });
- it('Update target on value change', function() {
- view.selectedComponent = component;
- view.model.set('value', propValue);
- var compStyle = view.selectedComponent.get('style');
- var assertStyle = {};
- assertStyle[propName] = propValue;
- compStyle.should.deep.equal(assertStyle);
- });
+ it('Update target on value change', () => {
+ view.selectedComponent = component;
+ view.model.set('value', propValue);
+ var compStyle = view.selectedComponent.get('style');
+ var assertStyle = {};
+ assertStyle[propName] = propValue;
+ expect(compStyle).toEqual(assertStyle);
+ });
- describe('With target setted', function() {
-
- beforeEach(function () {
- target.model = component;
- view = new PropertyRadioView({
- model: model,
- propTarget: target
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
-
- it('Update value and input on target swap', function() {
- var style = {};
- style[propName] = propValue;
- component.set('style', style);
- view.propTarget.trigger('update');
- view.model.get('value').should.equal(propValue);
- view.getInputValue().should.equal(propValue);
- });
-
- it('Update value after multiple swaps', function() {
- var style = {};
- style[propName] = propValue;
- component.set('style', style);
- view.propTarget.trigger('update');
- style[propName] = 'test2value';
- component.set('style', style);
- view.propTarget.trigger('update');
- view.model.get('value').should.equal('test2value');
- view.getInputValue().should.equal('test2value');
- });
-
- })
-
- describe('Init property', function() {
-
- beforeEach(function () {
- component = new Component();
- model = new Property({
- type: 'select',
- list: options,
- defaults: defValue,
- property: propName
- });
- view = new PropertyRadioView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
-
- it('Value as default', function() {
- view.model.get('value').should.equal(defValue);
- });
-
- it('Input value is as default', function() {
- view.getInputValue().should.equal(defValue);
- });
+ describe('With target setted', () => {
+ beforeEach(() => {
+ target.model = component;
+ view = new PropertyRadioView({
+ model,
+ propTarget: target
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
+
+ it('Update value and input on target swap', () => {
+ var style = {};
+ style[propName] = propValue;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ expect(view.model.get('value')).toEqual(propValue);
+ expect(view.getInputValue()).toEqual(propValue);
+ });
+
+ it('Update value after multiple swaps', () => {
+ var style = {};
+ style[propName] = propValue;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ style[propName] = 'test2value';
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ expect(view.model.get('value')).toEqual('test2value');
+ expect(view.getInputValue()).toEqual('test2value');
+ });
+
+ })
+
+ describe('Init property', () => {
+
+ beforeEach(() => {
+ component = new Component();
+ model = new Property({
+ type: 'select',
+ list: options,
+ defaults: defValue,
+ property: propName
});
+ view = new PropertyRadioView({
+ model
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
+
+ it('Value as default', () => {
+ expect(view.model.get('value')).toEqual(defValue);
+ });
+
+ it('Input value is as default', () => {
+ expect(view.getInputValue()).toEqual(defValue);
+ });
});
- }
- };
-});
\ No newline at end of file
+ });
+ }
+};
diff --git a/test/specs/style_manager/view/PropertySelectView.js b/test/specs/style_manager/view/PropertySelectView.js
index aa91d119d..37f71d477 100644
--- a/test/specs/style_manager/view/PropertySelectView.js
+++ b/test/specs/style_manager/view/PropertySelectView.js
@@ -1,196 +1,197 @@
-define(function(require, exports, module){
- 'use strict';
- var PropertySelectView = require('undefined');
- var Property = require('StyleManager/model/Property');
- var Component = require('DomComponents/model/Component');
-
- module.exports = {
- run : function(){
-
- describe('PropertySelectView', function() {
-
- var component;
- var $fixtures;
- var $fixture;
- var target;
- var model;
- var view;
- var propName = 'testprop';
- var propValue = 'test1value';
- var defValue = 'test2value';
- var options = [
- {value: 'test1value', style: 'test:style'},
- {name: 'test2', value: 'test2value'}
- ];
-
- before(function () {
- $fixtures = $("#fixtures");
- $fixture = $('
');
- });
+const PropertySelectView = require('style_manager/view/PropertySelectView');
+const Property = require('style_manager/model/Property');
+const Component = require('dom_components/model/Component');
+
+module.exports = {
+ run() {
+
+ describe('PropertySelectView', () => {
+
+ var component;
+ var $fixtures;
+ var $fixture;
+ var target;
+ var model;
+ var view;
+ var propTarget;
+ var options;
+ var propName = 'testprop';
+ var propValue = 'test1value';
+ var defValue = 'test2value';
+ var options = [
+ {value: 'test1value', style: 'test:style'},
+ {name: 'test2', value: 'test2value'}
+ ];
+
+ before(() => {
+ $fixtures = $("#fixtures");
+ $fixture = $('
');
+ });
- beforeEach(function () {
- target = new Component();
- component = new Component();
- model = new Property({
- type: 'select',
- list: options,
- property: propName
- });
- view = new PropertySelectView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
+ beforeEach(() => {
+ propTarget = Object.assign({}, Backbone.Events);
+ target = new Component();
+ component = new Component();
+ model = new Property({
+ type: 'select',
+ list: options,
+ property: propName
+ });
+ propTarget.model = component;
+ view = new PropertySelectView({
+ model,
+ propTarget
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
- afterEach(function () {
- //view.remove(); // strange errors ???
- });
+ afterEach(() => {
+ //view.remove(); // strange errors ???
+ });
- after(function () {
- $fixture.remove();
- delete component;
- });
+ after(() => {
+ $fixture.remove();
+ component = null;
+ });
- it('Rendered correctly', function() {
- var prop = view.el;
- $fixture.get(0).querySelector('.property').should.be.ok;
- prop.querySelector('.label').should.be.ok;
- prop.querySelector('.field').should.be.ok;
- });
+ it('Rendered correctly', () => {
+ var prop = view.el;
+ expect($fixture.get(0).querySelector('.property')).toExist();
+ expect(prop.querySelector('.label')).toExist();
+ expect(prop.querySelector('.field')).toExist();
+ });
- it('Select rendered', function() {
- var prop = view.el;
- prop.querySelector('select').should.be.ok;
- });
+ it('Select rendered', () => {
+ var prop = view.el;
+ expect(prop.querySelector('select')).toExist();
+ });
- it('Options rendered', function() {
- var select = view.el.querySelector('select');
- select.children.length.should.equal(options.length);
- });
+ it('Options rendered', () => {
+ var select = view.el.querySelector('select');
+ expect(select.children.length).toEqual(options.length);
+ });
- it('Options rendered correctly', function() {
- var select = view.el.querySelector('select');
- var children = select.children;
- children[0].value.should.equal(options[0].value);
- children[1].value.should.equal(options[1].value);
- children[0].textContent.should.equal(options[0].value);
- children[1].textContent.should.equal(options[1].name);
- children[0].getAttribute('style').should.equal(options[0].style);
- (children[1].getAttribute('style') == null).should.equal(true);
- });
+ it('Options rendered correctly', () => {
+ var select = view.el.querySelector('select');
+ var children = select.children;
+ expect(children[0].value).toEqual(options[0].value);
+ expect(children[1].value).toEqual(options[1].value);
+ expect(children[0].textContent).toEqual(options[0].value);
+ expect(children[1].textContent).toEqual(options[1].name);
+ expect(children[0].getAttribute('style')).toEqual(options[0].style);
+ expect(children[1].getAttribute('style')).toEqual(null);
+ });
- it('Input should exist', function() {
- view.$input.should.be.ok;
- });
+ it('Input should exist', () => {
+ expect(view.$input).toExist();
+ });
- it('Input value is empty', function() {
- view.model.get('value').should.be.empty;
- });
+ it('Input value is empty', () => {
+ expect(view.model.get('value')).toNotExist();
+ });
- it('Update model on input change', function() {
- view.$input.val(propValue).trigger('change');
- view.model.get('value').should.equal(propValue);
- });
+ it('Update model on input change', () => {
+ view.$input.val(propValue).trigger('change');
+ expect(view.model.get('value')).toEqual(propValue);
+ });
- it('Update input on value change', function() {
- view.model.set('value', propValue);
- view.$input.val().should.equal(propValue);
- });
+ it('Update input on value change', () => {
+ view.model.set('value', propValue);
+ expect(view.$input.val()).toEqual(propValue);
+ });
- it('Update target on value change', function() {
- view.selectedComponent = component;
- view.model.set('value', propValue);
- var compStyle = view.selectedComponent.get('style');
- var assertStyle = {};
- assertStyle[propName] = propValue;
- compStyle.should.deep.equal(assertStyle);
- });
+ it('Update target on value change', () => {
+ view.selectedComponent = component;
+ view.model.set('value', propValue);
+ var compStyle = view.selectedComponent.get('style');
+ var assertStyle = {};
+ assertStyle[propName] = propValue;
+ expect(compStyle).toEqual(assertStyle);
+ });
- describe('With target setted', function() {
-
- beforeEach(function () {
- target.model = component;
- view = new PropertySelectView({
- model: model,
- propTarget: target
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
-
- it('Update value and input on target swap', function() {
- var style = {};
- style[propName] = propValue;
- component.set('style', style);
- view.propTarget.trigger('update');
- view.model.get('value').should.equal(propValue);
- view.$input.val().should.equal(propValue);
- });
-
- it('Update value after multiple swaps', function() {
- var style = {};
- style[propName] = propValue;
- component.set('style', style);
- view.propTarget.trigger('update');
- style[propName] = 'test2value';
- component.set('style', style);
- view.propTarget.trigger('update');
- view.model.get('value').should.equal('test2value');
- view.$input.val().should.equal('test2value');
- });
-
- })
-
- describe('Init property', function() {
-
- beforeEach(function () {
- component = new Component();
- model = new Property({
- type: 'select',
- list: options,
- defaults: defValue,
- property: propName
- });
- view = new PropertySelectView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
-
- it('Value as default', function() {
- view.model.get('value').should.equal(defValue);
- });
-
- it('Empty value as default', function() {
- options = [
- {value: 'test1value', name: 'test1'},
- {value: 'test2value', name: 'test2'},
- {value: '', name: 'TestDef'}
- ];
- component = new Component();
- model = new Property({
- type: 'select',
- list: options,
- defaults: '',
- property: 'emptyDefault'
- });
- view = new PropertySelectView({
- model: model
- });
- $fixture.html(view.render().el);
- view.$input.val().should.equal('');
- });
-
- it('Input value is as default', function() {
- view.$input.val().should.equal(defValue);
- });
+ describe('With target setted', () => {
+ beforeEach(() => {
+ target.model = component;
+ view = new PropertySelectView({
+ model,
+ propTarget: target
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
+
+ it('Update value and input on target swap', () => {
+ var style = {};
+ style[propName] = propValue;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ expect(view.model.get('value')).toEqual(propValue);
+ expect(view.$input.val()).toEqual(propValue);
+ });
+
+ it('Update value after multiple swaps', () => {
+ var style = {};
+ style[propName] = propValue;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ style[propName] = 'test2value';
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ expect(view.model.get('value')).toEqual('test2value');
+ expect(view.$input.val()).toEqual('test2value');
+ });
+
+ })
+
+ describe('Init property', () => {
+
+ beforeEach(() => {
+ component = new Component();
+ model = new Property({
+ type: 'select',
+ list: options,
+ defaults: defValue,
+ property: propName
+ });
+ view = new PropertySelectView({
+ model
});
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
+
+ it('Value as default', () => {
+ expect(view.model.get('value')).toEqual(defValue);
+ });
+
+ it('Empty value as default', () => {
+ options = [
+ {value: 'test1value', name: 'test1'},
+ {value: 'test2value', name: 'test2'},
+ {value: '', name: 'TestDef'}
+ ];
+ component = new Component();
+ model = new Property({
+ type: 'select',
+ list: options,
+ defaults: '',
+ property: 'emptyDefault'
+ });
+ view = new PropertySelectView({
+ model
+ });
+ $fixture.html(view.render().el);
+ expect(view.$input.val()).toEqual('');
+ });
+
+ it('Input value is as default', () => {
+ expect(view.$input.val()).toEqual(defValue);
+ });
});
- }
- };
-});
\ No newline at end of file
+ });
+ }
+};
diff --git a/test/specs/style_manager/view/PropertyStackView.js b/test/specs/style_manager/view/PropertyStackView.js
index d850181b5..05f9de4d8 100644
--- a/test/specs/style_manager/view/PropertyStackView.js
+++ b/test/specs/style_manager/view/PropertyStackView.js
@@ -1,350 +1,347 @@
-define(function(require, exports, module){
- 'use strict';
- var PropertyStackView = require('undefined');
- var Property = require('StyleManager/model/Property');
- var Component = require('DomComponents/model/Component');
-
- module.exports = {
- run : function(){
-
- describe('PropertyStackView', function() {
-
- var component;
- var $fixtures;
- var $fixture;
- var target;
- var model;
- var view;
- var propName = 'testprop';
- var propValue = 'test1value';
- var defValue = 'test2value';
- var layers = [
- {value: 'lval1'},
- {value: 'lval2 lval22'},
- {value: 'lval3 lval32 lval33'}
- ];
- var properties = [
- {property: 'subprop1'},
- {
- type: 'integer',
- property: 'subprop2',
- defaults: 0,
- units: ['%', 'px']
- },
- {
- type: 'select',
- property: 'subprop3',
- defaults: 'val2',
- list: [
- {value:'val1'},
- {value:'val2'},
- {value:'val3'},
- ]
- },
- ];
-
- before(function () {
- $fixtures = $("#fixtures");
- $fixture = $('
');
- });
+const PropertyStackView = require('style_manager/view/PropertyStackView');
+const Property = require('style_manager/model/Property');
+const Component = require('dom_components/model/Component');
+
+module.exports = {
+ run() {
+
+ describe('PropertyStackView', () => {
+
+ var component;
+ var $fixtures;
+ var $fixture;
+ var target;
+ var model;
+ var view;
+ var propName = 'testprop';
+ var propValue = 'test1value';
+ var defValue = 'test2value';
+ var layers = [
+ {value: 'lval1'},
+ {value: 'lval2 lval22'},
+ {value: 'lval3 lval32 lval33'}
+ ];
+ var properties = [
+ {property: 'subprop1'},
+ {
+ type: 'integer',
+ property: 'subprop2',
+ defaults: 0,
+ units: ['%', 'px']
+ },
+ {
+ type: 'select',
+ property: 'subprop3',
+ defaults: 'val2',
+ list: [
+ {value:'val1'},
+ {value:'val2'},
+ {value:'val3'},
+ ]
+ },
+ ];
+
+ before(() => {
+ $fixtures = $("#fixtures");
+ $fixture = $('
');
+ });
- beforeEach(function () {
- target = new Component();
- component = new Component();
- target.model = component;
- model = new Property({
- type: 'stack',
- property: propName,
- properties: properties
- });
- view = new PropertyStackView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
+ beforeEach(() => {
+ target = new Component();
+ component = new Component();
+ target.model = component;
+ model = new Property({
+ type: 'stack',
+ property: propName,
+ properties
+ });
+ view = new PropertyStackView({
+ model
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
- afterEach(function () {
- //view.remove(); // strange errors ???
- });
+ afterEach(() => {
+ //view.remove(); // strange errors ???
+ });
- after(function () {
- $fixture.remove();
- delete component;
- delete view;
- delete model;
- });
+ after(() => {
+ $fixture.remove();
+ component = null;
+ view = null;
+ model = null;
+ });
- it('Rendered correctly', function() {
- var prop = view.el;
- $fixture.get(0).querySelector('.property').should.be.ok;
- prop.querySelector('.label').should.be.ok;
- prop.querySelector('.field').should.be.ok;
- prop.querySelector('#add').should.be.ok;
- });
+ it('Rendered correctly', () => {
+ var prop = view.el;
+ expect($fixture.get(0).querySelector('.property')).toExist();
+ expect(prop.querySelector('.label')).toExist();
+ expect(prop.querySelector('.field')).toExist();
+ expect(prop.querySelector('#add')).toExist();
+ });
- it('Layers rendered', function() {
- view.el.querySelector('.layers').should.be.ok;
- });
+ it('Layers rendered', () => {
+ expect(view.el.querySelector('.layers')).toExist();
+ });
- it('Layers should exist', function() {
- view.$props.should.be.ok;
- });
+ it('Layers should exist', () => {
+ expect(view.$props).toExist();
+ });
- it('Layers rendered correctly', function() {
- var children = view.$props.get(0).children;
- children.length.should.equal(properties.length + 1);
- children[0].id.should.equal(properties[0].property);
- children[1].id.should.equal(properties[1].property);
- children[2].id.should.equal(properties[2].property);
- });
+ it('Layers rendered correctly', () => {
+ var children = view.$props.get(0).children;
+ expect(children.length).toEqual(properties.length + 1);
+ expect(children[0].id).toEqual(properties[0].property);
+ expect(children[1].id).toEqual(properties[1].property);
+ expect(children[2].id).toEqual(properties[2].property);
+ });
- it('Input value is empty', function() {
- view.model.get('value').should.be.empty;
- });
+ it('Input value is empty', () => {
+ expect(view.model.get('value')).toNotExist();
+ });
- it('Layers container is empty', function() {
- var layers = view.el.querySelector('.layers');
- layers.innerHTML.should.be.empty;
- });
+ it('Layers container is empty', () => {
+ var layers = view.el.querySelector('.layers');
+ expect(layers.innerHTML).toNotExist();
+ });
- describe('With layers', function() {
-
- beforeEach(function () {
- model = new Property({
- type: 'stack',
- property: propName,
- properties: properties,
- });
- view = new PropertyStackView({
- model: model,
- propTarget: target
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- model.get('layers').add(layers);
- });
-
- it('Layers inserted', function() {
- view.getLayers().length.should.equal(layers.length);
- });
-
- it('Get value on index', function() {
- view.model.set('stackIndex', 1);
- view.valueOnIndex(1).should.equal('lval22');
- });
-
- it('createValue merges layers', function() {
- view.createValue().should.equal('lval1, lval2 lval22, lval3 lval32 lval33');
- });
-
- it('Add layer', function() {
- view.addLayer();
- view.getLayers().length.should.equal(layers.length+1);
- });
+ describe('With layers', () => {
+ beforeEach(() => {
+ model = new Property({
+ type: 'stack',
+ property: propName,
+ properties,
});
+ view = new PropertyStackView({
+ model,
+ propTarget: target
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ model.get('layers').add(layers);
+ });
+
+ it('Layers inserted', () => {
+ expect(view.getLayers().length).toEqual(layers.length);
+ });
+
+ it('Get value on index', () => {
+ view.model.set('stackIndex', 1);
+ expect(view.valueOnIndex(1)).toEqual('lval22');
+ });
+
+ it('createValue merges layers', () => {
+ expect(view.createValue()).toEqual('lval1, lval2 lval22, lval3 lval32 lval33');
+ });
- describe('With target setted', function() {
-
- var prop2Val;
- var prop3Val;
- var prop2Unit;
- var finalResult;
- var $prop1;
- var $prop2;
- var $prop3;
-
- beforeEach(function () {
- model = new Property({
- type: 'stack',
- property: propName,
- properties: properties
- });
- view = new PropertyStackView({
- model: model,
- propTarget: target
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- prop3Val = properties[2].list[2].value;
- prop2Val = properties[1].defaults;
- prop2Unit = properties[1].units[0];
- finalResult = propValue + ' ' + prop2Val + prop2Unit +' ' + prop3Val;
- view.addLayer();
- $prop1 = view.$props.find('#' + properties[0].property + ' input');
- $prop2 = view.$props.find('#' + properties[1].property + ' input');
- $prop3 = view.$props.find('#' + properties[2].property + ' select');
- });
-
- it('Update model on input change', function() {
- $prop1.val(propValue).trigger('change');
- $prop3.val(prop3Val).trigger('change');
- view.model.get('value').should.equal(finalResult);
- });
-
- it('Update value on models change', function() {
- view.model.get('properties').at(0).set('value', propValue);
- view.model.get('properties').at(2).set('value', prop3Val);
- view.model.get('value').should.equal(finalResult);
- });
-
- it('Update target on value change', function() {
- $prop1.val(propValue).trigger('change');
- var compStyle = view.getTarget().get('style');
- var assertStyle = {};
- assertStyle[propName] = propValue + ' 0% val2';
- compStyle.should.deep.equal(assertStyle);
- });
-
- it('Update value and input on target swap', function() {
- var style = {};
- var finalResult2 = 'A B C';
- style[propName] = finalResult + ', ' + finalResult2;
- component.set('style', style);
- view.propTarget.trigger('update');
- var layers = view.getLayers();
- layers.at(0).get('value').should.equal(finalResult);
- layers.at(1).get('value').should.equal(finalResult2);
- });
-
- it('Update value after multiple swaps', function() {
- var style = {};
- var finalResult2 = 'A2 B2 C2';
- style[propName] = finalResult;
- component.set('style', style);
- view.propTarget.trigger('update');
- style[propName] = finalResult + ', ' + finalResult2;
- component.set('style', style);
- view.propTarget.trigger('update');
- var layers = view.getLayers();
- layers.at(0).get('value').should.equal(finalResult);
- layers.at(1).get('value').should.equal(finalResult2);
- });
-
- it('The value is correctly extracted from the composite string', function() {
- var style = {};
- style[propName] = 'value1 value2, value3 value4';
- component.set('style', style);
- view.propTarget.trigger('update');
- view.model.set('stackIndex', 1);
- view.valueOnIndex(0).should.equal('value3');
- view.valueOnIndex(1).should.equal('value4');
- (view.valueOnIndex(2) === null).should.equal(true);
- });
-
- it('The value is correctly extracted from the string with functions', function() {
- var style = {};
- style[propName] = 'func(a1a, s2a,d3a) value1 value2, func(4ddb, aAS5b, sS.6b) value3';
- component.set('style', style);
- view.propTarget.trigger('update');
- view.model.set('stackIndex', 1);
- view.valueOnIndex(0).should.equal('func(4ddb,aAS5b,sS.6b)');
- view.valueOnIndex(1).should.equal('value3');
- (view.valueOnIndex(2) === null).should.equal(true);
- });
-
- it('Build value from properties', function() {
- view.model.get('properties').at(0).set('value', propValue);
- view.model.get('properties').at(2).set('value', prop3Val);
- view.build().should.equal(finalResult);
- });
+ it('Add layer', () => {
+ view.addLayer();
+ expect(view.getLayers().length).toEqual(layers.length + 1);
+ });
+ });
+
+ describe('With target setted', () => {
+
+ var prop2Val;
+ var prop3Val;
+ var prop2Unit;
+ var finalResult;
+ var $prop1;
+ var $prop2;
+ var $prop3;
+
+ beforeEach(() => {
+ model = new Property({
+ type: 'stack',
+ property: propName,
+ properties
});
+ view = new PropertyStackView({
+ model,
+ propTarget: target
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ prop3Val = properties[2].list[2].value;
+ prop2Val = properties[1].defaults;
+ prop2Unit = properties[1].units[0];
+ finalResult = propValue + ' ' + prop2Val + prop2Unit +' ' + prop3Val;
+ view.addLayer();
+ $prop1 = view.$props.find('#' + properties[0].property + ' input');
+ $prop2 = view.$props.find('#' + properties[1].property + ' input');
+ $prop3 = view.$props.find('#' + properties[2].property + ' select');
+ });
+
+ it('Update model on input change', () => {
+ $prop1.val(propValue).trigger('change');
+ $prop3.val(prop3Val).trigger('change');
+ expect(view.model.get('value')).toEqual(finalResult);
+ });
+
+ it('Update value on models change', () => {
+ view.model.get('properties').at(0).set('value', propValue);
+ view.model.get('properties').at(2).set('value', prop3Val);
+ expect(view.model.get('value')).toEqual(finalResult);
+ });
+
+ it('Update target on value change', () => {
+ $prop1.val(propValue).trigger('change');
+ var compStyle = view.getTarget().get('style');
+ var assertStyle = {};
+ assertStyle[propName] = propValue + ' 0% val2';
+ expect(compStyle).toEqual(assertStyle);
+ });
+
+ it('Update value and input on target swap', () => {
+ var style = {};
+ var finalResult2 = 'A B C';
+ style[propName] = finalResult + ', ' + finalResult2;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ var layers = view.getLayers();
+ expect(layers.at(0).get('value')).toEqual(finalResult);
+ expect(layers.at(1).get('value')).toEqual(finalResult2);
+ });
+
+ it('Update value after multiple swaps', () => {
+ var style = {};
+ var finalResult2 = 'A2 B2 C2';
+ style[propName] = finalResult;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ style[propName] = finalResult + ', ' + finalResult2;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ var layers = view.getLayers();
+ expect(layers.at(0).get('value')).toEqual(finalResult);
+ expect(layers.at(1).get('value')).toEqual(finalResult2);
+ });
+
+ it('The value is correctly extracted from the composite string', () => {
+ var style = {};
+ style[propName] = 'value1 value2, value3 value4';
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ view.model.set('stackIndex', 1);
+ expect(view.valueOnIndex(0)).toEqual('value3');
+ expect(view.valueOnIndex(1)).toEqual('value4');
+ expect(view.valueOnIndex(2)).toEqual(null);
+
+ });
+
+ it('The value is correctly extracted from the string with functions', () => {
+ var style = {};
+ style[propName] = 'func(a1a, s2a,d3a) value1 value2, func(4ddb, aAS5b, sS.6b) value3';
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ view.model.set('stackIndex', 1);
+ expect(view.valueOnIndex(0)).toEqual('func(4ddb,aAS5b,sS.6b)');
+ expect(view.valueOnIndex(1)).toEqual('value3');
+ expect(view.valueOnIndex(2)).toEqual(null);
+ });
+
+ it('Build value from properties', () => {
+ view.model.get('properties').at(0).set('value', propValue);
+ view.model.get('properties').at(2).set('value', prop3Val);
+ expect(view.build()).toEqual(finalResult);
+ });
- describe('Detached with target setted', function() {
-
- var prop2Val;
- var prop3Val;
- var prop2Unit;
- var finalResult;
- var $prop1;
- var $prop2;
- var $prop3;
- var compStyle = {
- subprop1: '1px, 20px, 30px',
- subprop2: 'A, B, C',
- subprop3: 'W, X, Y',
- subprop555: 'T, T, T',
- };
-
- beforeEach(function () {
- model = new Property({
- type: 'stack',
- property: propName,
- properties: properties,
- detached: true,
- });
- view = new PropertyStackView({
- model: model,
- propTarget: target
- });
- $fixture.html(view.render().el);
- prop3Val = properties[2].list[2].value;
- prop2Val = properties[1].defaults;
- prop2Unit = properties[1].units[0];
- finalResult = propValue + ' ' + prop2Val + prop2Unit +' ' + prop3Val;
- view.addLayer();
- $prop1 = view.$props.find('#' + properties[0].property + ' input');
- $prop2 = view.$props.find('#' + properties[1].property + ' input');
- $prop3 = view.$props.find('#' + properties[2].property + ' select');
- });
-
- it('Returns correctly layers array from target', function() {
- component.set('style', compStyle);
- var result = [{
- subprop1: '1px',
- subprop2: 'A',
- subprop3: 'W',
- },{
- subprop1: '20px',
- subprop2: 'B',
- subprop3: 'X',
- },{
- subprop1: '30px',
- subprop2: 'C',
- subprop3: 'Y',
- }];
- view.getLayersFromTarget().should.deep.equal(result);
- });
-
- it('Update target on detached value change', function() {
- $prop1.val(propValue).trigger('change');
- var compStyle = view.getTarget().get('style');
- var assertStyle = {};
- assertStyle[properties[0].property] = $prop1.val();
- assertStyle[properties[1].property] = '0%';
- assertStyle[properties[2].property] = properties[2].defaults;
- compStyle.should.deep.equal(assertStyle);
- });
-
- it('Update value and input on target swap', function() {
- var style = {};
- component.set('style', compStyle);
- view.propTarget.trigger('update');
- var layers = view.getLayers();
- layers.length.should.equal(3);
- layers.at(0).get('values').should.deep.equal({
- subprop1: '1px',
- subprop2: 'A',
- subprop3: 'W',
- });
- layers.at(1).get('values').should.deep.equal({
- subprop1: '20px',
- subprop2: 'B',
- subprop3: 'X',
- });
- layers.at(2).get('values').should.deep.equal({
- subprop1: '30px',
- subprop2: 'C',
- subprop3: 'Y',
- });
- });
+ });
+ describe('Detached with target setted', () => {
+
+ var prop2Val;
+ var prop3Val;
+ var prop2Unit;
+ var finalResult;
+ var $prop1;
+ var $prop2;
+ var $prop3;
+ var compStyle = {
+ subprop1: '1px, 20px, 30px',
+ subprop2: 'A, B, C',
+ subprop3: 'W, X, Y',
+ subprop555: 'T, T, T',
+ };
+
+ beforeEach(() => {
+ model = new Property({
+ type: 'stack',
+ property: propName,
+ properties,
+ detached: true,
+ });
+ view = new PropertyStackView({
+ model,
+ propTarget: target
+ });
+ $fixture.html(view.render().el);
+ prop3Val = properties[2].list[2].value;
+ prop2Val = properties[1].defaults;
+ prop2Unit = properties[1].units[0];
+ finalResult = propValue + ' ' + prop2Val + prop2Unit +' ' + prop3Val;
+ view.addLayer();
+ $prop1 = view.$props.find('#' + properties[0].property + ' input');
+ $prop2 = view.$props.find('#' + properties[1].property + ' input');
+ $prop3 = view.$props.find('#' + properties[2].property + ' select');
+ });
+
+ it('Returns correctly layers array from target', () => {
+ component.set('style', compStyle);
+ var result = [{
+ subprop1: '1px',
+ subprop2: 'A',
+ subprop3: 'W',
+ },{
+ subprop1: '20px',
+ subprop2: 'B',
+ subprop3: 'X',
+ },{
+ subprop1: '30px',
+ subprop2: 'C',
+ subprop3: 'Y',
+ }];
+ expect(view.getLayersFromTarget()).toEqual(result);
+ });
+
+ it('Update target on detached value change', () => {
+ $prop1.val(propValue).trigger('change');
+ var compStyle = view.getTarget().get('style');
+ var assertStyle = {};
+ assertStyle[properties[0].property] = $prop1.val();
+ assertStyle[properties[1].property] = '0%';
+ assertStyle[properties[2].property] = properties[2].defaults;
+ expect(compStyle).toEqual(assertStyle);
+ });
+
+ it('Update value and input on target swap', () => {
+ var style = {};
+ component.set('style', compStyle);
+ view.propTarget.trigger('update');
+ var layers = view.getLayers();
+ expect(layers.length).toEqual(3);
+ expect(layers.at(0).get('values')).toEqual({
+ subprop1: '1px',
+ subprop2: 'A',
+ subprop3: 'W',
+ });
+ expect(layers.at(1).get('values')).toEqual({
+ subprop1: '20px',
+ subprop2: 'B',
+ subprop3: 'X',
+ });
+ expect(layers.at(2).get('values')).toEqual({
+ subprop1: '30px',
+ subprop2: 'C',
+ subprop3: 'Y',
});
+ });
});
- }
- };
-});
\ No newline at end of file
+ });
+ }
+};
diff --git a/test/specs/style_manager/view/PropertyView.js b/test/specs/style_manager/view/PropertyView.js
index 8e04c6192..aee1d5382 100644
--- a/test/specs/style_manager/view/PropertyView.js
+++ b/test/specs/style_manager/view/PropertyView.js
@@ -1,238 +1,233 @@
-define(function(require, exports, module){
- 'use strict';
- var PropertyView = require('undefined');
- var Property = require('StyleManager/model/Property');
- var Component = require('DomComponents/model/Component');
-
- module.exports = {
- run : function(){
-
- describe('PropertyView', function() {
-
- var component;
- var $fixtures;
- var $fixture;
- var target;
- var model;
- var view;
- var propName = 'testprop';
- var propValue = 'testvalue';
- var defValue = 'testDefault';
-
- before(function () {
- $fixtures = $("#fixtures");
- $fixture = $('
');
- });
-
- beforeEach(function () {
- target = new Component();
- component = new Component();
- model = new Property({property: propName});
- view = new PropertyView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
+const PropertyView = require('style_manager/view/PropertyView');
+const Property = require('style_manager/model/Property');
+const Component = require('dom_components/model/Component');
+
+module.exports = {
+ run() {
+
+ describe('PropertyView', () => {
+
+ var component;
+ var $fixtures;
+ var $fixture;
+ var target;
+ var model;
+ var view;
+ var propTarget;
+ var options;
+ var propName = 'testprop';
+ var propValue = 'testvalue';
+ var defValue = 'testDefault';
+
+ before(() => {
+ $fixtures = $("#fixtures");
+ $fixture = $('
');
+ });
- afterEach(function () {
- //view.remove(); // strange errors ???
- });
+ beforeEach(() => {
+ propTarget = Object.assign({}, Backbone.Events);
+ target = new Component();
+ component = new Component();
+ model = new Property({property: propName});
+ propTarget.model = component;
+ options = {
+ model,
+ propTarget
+ };
+ view = new PropertyView(options);
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
- after(function () {
- $fixture.remove();
- delete component;
- });
+ afterEach(() => {
+ //view.remove(); // strange errors ???
+ });
- it('Rendered correctly', function() {
- var prop = view.el;
- $fixture.get(0).querySelector('.property').should.be.ok;
- prop.querySelector('.label').should.be.ok;
- prop.querySelector('.field').should.be.ok;
- });
+ after(() => {
+ $fixture.remove();
+ component = null;
+ });
- it('Input should exist', function() {
- view.$input.should.be.ok;
- });
+ it('Rendered correctly', () => {
+ var prop = view.el;
+ expect($fixture.get(0).querySelector('.property')).toExist();
+ expect(prop.querySelector('.label')).toExist();
+ expect(prop.querySelector('.field')).toExist();
+ });
- it('Input value is empty', function() {
- view.model.get('value').should.be.empty;
- view.$input.val().should.be.empty;
- });
+ it('Input should exist', () => {
+ expect(view.$input).toExist();
+ });
- it('Model not change without update trigger', function() {
- view.$input.val(propValue);
- view.model.get('value').should.be.empty;
- });
+ it('Input value is empty', () => {
+ expect(view.model.get('value')).toNotExist();
+ expect(view.$input.val()).toNotExist();
+ });
- // Tests valueUpdated()
- it('Update model on input change', function() {
- view.$input.val(propValue).trigger('change');
- view.model.get('value').should.equal(propValue);
- });
+ it('Model not change without update trigger', () => {
+ view.$input.val(propValue);
+ expect(view.model.get('value')).toNotExist();
+ });
- // Tests getValueForTarget()
- it('Get value for target', function() {
- view.model.set('value', propValue);
- view.getValueForTarget().should.equal(propValue);
- });
+ // Tests valueUpdated()
+ it('Update model on input change', () => {
+ view.$input.val(propValue).trigger('change');
+ expect(view.model.get('value')).toEqual(propValue);
+ });
- // Tests valueChanged() -> ...
- it('Update input on value change', function() {
- view.model.set('value', propValue);
- view.$input.val().should.equal(propValue);
- });
+ // Tests getValueForTarget()
+ it('Get value for target', () => {
+ view.model.set('value', propValue);
+ expect(view.getValueForTarget()).toEqual(propValue);
+ });
- it('Update target on value change', function() {
- view.selectedComponent = component;
- view.model.set('value', propValue);
- var compStyle = view.selectedComponent.get('style');
- var assertStyle = {};
- assertStyle[propName] = propValue;
- compStyle.should.deep.equal(assertStyle);
- });
+ // Tests valueChanged() -> ...
+ it('Update input on value change', () => {
+ view.model.set('value', propValue);
+ expect(view.$input.val()).toEqual(propValue);
+ });
- it('Update target on value change with functionName', function() {
- view.selectedComponent = component;
- view.model.set('functionName', 'testfunc');
- view.model.set('value', propValue);
- var compStyle = view.selectedComponent.get('style');
- var assertStyle = {};
- assertStyle[propName] = 'testfunc(' + propValue + ')';
- compStyle.should.deep.equal(assertStyle);
- });
+ it('Update target on value change', () => {
+ view.model.set('value', propValue);
+ var compStyle = view.getTargetModel().get('style');
+ var assertStyle = {};
+ assertStyle[propName] = propValue;
+ expect(compStyle).toEqual(assertStyle);
+ });
- it('Clean target from the property if its value is empty', function() {
- view.selectedComponent = component;
- view.model.set('value', propValue);
- view.model.set('value', '');
- var compStyle = view.selectedComponent.get('style');
- compStyle.should.deep.equal({});
- });
+ it('Update target on value change with functionName', () => {
+ view.model.set('functionName', 'testfunc');
+ view.model.set('value', propValue);
+ var compStyle = view.getTargetModel().get('style');
+ var assertStyle = {};
+ assertStyle[propName] = 'testfunc(' + propValue + ')';
+ expect(compStyle).toEqual(assertStyle);
+ });
- it('Check stylable element', function() {
- view.selectedComponent = component;
- view.isTargetStylable().should.equal(true);
- component.set('stylable', false);
- view.isTargetStylable().should.equal(false);
- component.set('stylable', [propName]);
- view.isTargetStylable().should.equal(true);
- component.set('stylable', ['test1', propName]);
- view.isTargetStylable().should.equal(true);
- component.set('stylable', ['test1', 'test2']);
- view.isTargetStylable().should.equal(false);
- });
+ it('Clean target from the property if its value is empty', () => {
+ view.model.set('value', propValue);
+ view.model.set('value', '');
+ var compStyle = view.getTargetModel().get('style');
+ expect(compStyle).toEqual({});
+ });
- it('Target style is empty without values', function() {
- view.selectedComponent = component;
- view.getComponentValue().should.be.empty;
- });
+ it('Check stylable element', () => {
+ expect(view.isTargetStylable()).toEqual(true);
+ component.set('stylable', false);
+ expect(view.isTargetStylable()).toEqual(false);
+ component.set('stylable', [propName]);
+ expect(view.isTargetStylable()).toEqual(true);
+ component.set('stylable', ['test1', propName]);
+ expect(view.isTargetStylable()).toEqual(true);
+ component.set('stylable', ['test1', 'test2']);
+ expect(view.isTargetStylable()).toEqual(false);
+ });
- it('Target style is correct', function() {
- view.selectedComponent = component;
- var style = {};
- style[propName] = propValue;
- component.set('style', style);
- view.getComponentValue().should.equal(propValue);
- });
+ it('Target style is empty without values', () => {
+ expect(view.getComponentValue()).toNotExist();
+ });
- it('Target style is empty with an other style', function() {
- view.selectedComponent = component;
- var style = {};
- style[propName + '2'] = propValue;
- component.set('style', style);
- view.getComponentValue().should.be.empty;
- });
+ it('Target style is correct', () => {
+ var style = {};
+ style[propName] = propValue;
+ component.set('style', style);
+ expect(view.getComponentValue()).toEqual(propValue);
+ });
- it('Fetch value from function', function() {
- view.selectedComponent = component;
- var style = {};
- style[propName] = 'testfun(' + propValue + ')';
- component.set('style', style);
- view.model.set('functionName', 'testfun');
- view.getComponentValue().should.equal(propValue);
- });
+ it('Target style is empty with an other style', () => {
+ var style = {};
+ style[propName + '2'] = propValue;
+ component.set('style', style);
+ expect(view.getComponentValue()).toNotExist();
+ });
- describe('With target setted', function() {
-
- beforeEach(function () {
- target.model = component;
- view = new PropertyView({
- model: model,
- propTarget: target
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
-
- it('updateTargetStyle', function() {
- view.updateTargetStyle(propValue);
- var style = {};
- style[propName] = propValue;
- component.get('style').should.deep.equal(style);
- });
-
- it('updateTargetStyle with custom property', function() {
- view.updateTargetStyle(propValue, propName + '2');
- var style = {};
- style[propName + '2'] = propValue;
- component.get('style').should.deep.equal(style);
- });
-
- it('Update value and input on target swap', function() {
- var style = {};
- style[propName] = propValue;
- component.set('style', style);
- view.propTarget.trigger('update');
- view.model.get('value').should.equal(propValue);
- view.$input.val().should.equal(propValue);
- });
-
- it('Update value after multiple swaps', function() {
- var style = {};
- style[propName] = propValue;
- component.set('style', style);
- view.propTarget.trigger('update');
- style[propName] = propValue + '2';
- component.set('style', style);
- view.propTarget.trigger('update');
- view.model.get('value').should.equal(propValue + '2');
- view.$input.val().should.equal(propValue + '2');
- });
-
- })
-
- describe('Init property', function() {
-
- beforeEach(function () {
- component = new Component();
- model = new Property({
- property: propName,
- defaults: defValue
- });
- view = new PropertyView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
-
- it('Value as default', function() {
- view.model.get('value').should.equal(defValue);
- });
-
- it('Placeholder as default', function() {
- view.$input.attr('placeholder').should.equal(defValue);
- });
-
- it('Input value is empty', function() {
- view.$input.val().should.equal(defValue);
- });
+ it('Fetch value from function', () => {
+ view.selectedComponent = component;
+ var style = {};
+ style[propName] = 'testfun(' + propValue + ')';
+ component.set('style', style);
+ view.model.set('functionName', 'testfun');
+ expect(view.getComponentValue()).toEqual(propValue);
+ });
- });
+ describe('With target setted', () => {
+
+ beforeEach(() => {
+ target.model = component;
+ view = new PropertyView({
+ model,
+ propTarget: target
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
+
+ it('updateTargetStyle', () => {
+ view.updateTargetStyle(propValue);
+ var style = {};
+ style[propName] = propValue;
+ expect(component.get('style')).toEqual(style);
+ });
+
+ it('updateTargetStyle with custom property', () => {
+ view.updateTargetStyle(propValue, propName + '2');
+ var style = {};
+ style[propName + '2'] = propValue;
+ expect(component.get('style')).toEqual(style);
+ });
+
+ it('Update value and input on target swap', () => {
+ var style = {};
+ style[propName] = propValue;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ expect(view.model.get('value')).toEqual(propValue);
+ expect(view.$input.val()).toEqual(propValue);
+ });
+
+ it('Update value after multiple swaps', () => {
+ var style = {};
+ style[propName] = propValue;
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ style[propName] = propValue + '2';
+ component.set('style', style);
+ view.propTarget.trigger('update');
+ expect(view.model.get('value')).toEqual(propValue + '2');
+ expect(view.$input.val()).toEqual(propValue + '2');
+ });
+
+ })
+
+ describe('Init property', () => {
+
+ beforeEach(() => {
+ component = new Component();
+ model = new Property({
+ property: propName,
+ defaults: defValue
+ });
+ view = new PropertyView({
+ model
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
+
+ it('Value as default', () => {
+ expect(view.model.get('value')).toEqual(defValue);
+ });
+
+ it('Placeholder as default', () => {
+ expect(view.$input.attr('placeholder')).toEqual(defValue);
+ });
+
+ it('Input value is empty', () => {
+ expect(view.$input.val()).toEqual(defValue);
+ });
});
- }
- };
-});
\ No newline at end of file
+ });
+ }
+};
diff --git a/test/specs/style_manager/view/SectorView.js b/test/specs/style_manager/view/SectorView.js
index c4e2a9023..406b47348 100644
--- a/test/specs/style_manager/view/SectorView.js
+++ b/test/specs/style_manager/view/SectorView.js
@@ -1,109 +1,104 @@
-define(function(require, exports, module){
- 'use strict';
- var SectorView = require('undefined');
- var Sector = require('StyleManager/model/Sector');
+const SectorView = require('style_manager/view/SectorView');
+const Sector = require('style_manager/model/Sector');
- module.exports = {
- run : function(){
+module.exports = {
+ run() {
- describe('SectorView', function() {
+ describe('SectorView', () => {
- var $fixtures;
- var $fixture;
- var model;
- var view;
+ var $fixtures;
+ var $fixture;
+ var model;
+ var view;
- before(function () {
- $fixtures = $("#fixtures");
- $fixture = $('
');
- });
-
- beforeEach(function () {
- model = new Sector();
- view = new SectorView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
+ before(() => {
+ $fixtures = $("#fixtures");
+ $fixture = $('
');
+ });
- afterEach(function () {
- view.remove();
- });
+ beforeEach(() => {
+ model = new Sector();
+ view = new SectorView({
+ model
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
- after(function () {
- $fixture.remove();
- });
+ afterEach(() => {
+ view.remove();
+ });
- it('Rendered correctly', function() {
- var sector = view.el;
- sector.should.be.ok;
- sector.querySelector('.title').should.be.ok;
- var props = sector.querySelector('.properties');
- props.should.be.ok;
- sector.classList.contains('open').should.equal(true);
- });
+ after(() => {
+ $fixture.remove();
+ });
- it('No properties', function() {
- var props = view.el.querySelector('.properties');
- props.innerHTML.should.equal('
');
- });
+ it('Rendered correctly', () => {
+ var sector = view.el;
+ expect(sector.querySelector('.title')).toExist();
+ var props = sector.querySelector('.properties');
+ expect(props).toExist();
+ expect(sector.classList.contains('open')).toEqual(true);
+ });
- it('Update on open', function() {
- var sector = view.el;
- var props = sector.querySelector('.properties');
- model.set('open', false);
- sector.classList.contains('open').should.equal(false);
- props.style.display.should.equal('none');
- });
+ it('No properties', () => {
+ var props = view.el.querySelector('.properties');
+ expect(props.innerHTML).toEqual('
');
+ });
- it('Toggle on click', function() {
- var sector = view.el;
- view.$el.find('.title').click();
- sector.classList.contains('open').should.equal(false);
- });
+ it('Update on open', () => {
+ var sector = view.el;
+ var props = sector.querySelector('.properties');
+ model.set('open', false);
+ expect(sector.classList.contains('open')).toEqual(false);
+ expect(props.style.display).toEqual('none');
+ });
- describe('Init with options', function() {
-
- beforeEach(function () {
- model = new Sector({
- open: false,
- name: 'TestName',
- properties: [
- {type:'integer'},
- {type:'integer'},
- {type:'integer'},
- ]
- });
- view = new SectorView({
- model: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
-
- afterEach(function () {
- view.remove();
- });
-
- it('Rendered correctly2', function() {
- var sector = view.el;
- var props = sector.querySelector('.properties');
- sector.querySelector('.title').innerHTML.should.contain('TestName');
- props.should.be.ok;
- sector.classList.contains('open').should.equal(false);
- props.style.display.should.equal('none');
- });
-
- it('Has properties', function() {
- var props = view.el.querySelector('.properties');
- props.children.length.should.equal(4); // Last one is 'clear' element
- });
+ it('Toggle on click', () => {
+ var sector = view.el;
+ view.$el.find('.title').click();
+ expect(sector.classList.contains('open')).toEqual(false);
+ });
+ describe('Init with options', () => {
+
+ beforeEach(() => {
+ model = new Sector({
+ open: false,
+ name: 'TestName',
+ properties: [
+ {type:'integer'},
+ {type:'integer'},
+ {type:'integer'},
+ ]
+ });
+ view = new SectorView({
+ model
});
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
+
+ afterEach(() => {
+ view.remove();
+ });
+
+ it('Rendered correctly2', () => {
+ var sector = view.el;
+ var props = sector.querySelector('.properties');
+ expect(sector.querySelector('.title').innerHTML).toContain('TestName');
+ expect(props).toExist();
+ expect(sector.classList.contains('open')).toEqual(false);
+ expect(props.style.display).toEqual('none');
+ });
+
+ it('Has properties', () => {
+ var props = view.el.querySelector('.properties');
+ expect(props.children.length).toEqual(4); // Last one is 'clear' element
+ });
});
- }
- };
-});
\ No newline at end of file
+ });
+ }
+};
diff --git a/test/specs/style_manager/view/SectorsView.js b/test/specs/style_manager/view/SectorsView.js
index 2db86a9b3..f1e61a2c1 100644
--- a/test/specs/style_manager/view/SectorsView.js
+++ b/test/specs/style_manager/view/SectorsView.js
@@ -1,51 +1,47 @@
-define(function(require, exports, module){
- 'use strict';
- var SectorsView = require('undefined');
- var Sectors = require('StyleManager/model/Sectors');
-
- module.exports = {
- run : function(){
-
- describe('SectorsView', function() {
-
- var $fixtures;
- var $fixture;
- var model;
- var view;
-
- before(function () {
- $fixtures = $("#fixtures");
- $fixture = $('
');
- });
-
- beforeEach(function () {
- model = new Sectors([]);
- view = new SectorsView({
- collection: model
- });
- $fixture.empty().appendTo($fixtures);
- $fixture.html(view.render().el);
- });
-
- afterEach(function () {
- view.collection.reset();
- });
-
- after(function () {
- $fixture.remove();
- });
-
- it("Collection is empty", function (){
- view.el.innerHTML.should.be.empty;
- });
-
- it("Add new sectors", function (){
- view.collection.add([{}, {}]);
- view.el.children.length.should.equal(2);
- });
+const SectorsView = require('style_manager/view/SectorsView');
+const Sectors = require('style_manager/model/Sectors');
+module.exports = {
+ run() {
+
+ describe('SectorsView', () => {
+
+ var $fixtures;
+ var $fixture;
+ var model;
+ var view;
+
+ before(() => {
+ $fixtures = $("#fixtures");
+ $fixture = $('
');
+ });
+
+ beforeEach(() => {
+ model = new Sectors([]);
+ view = new SectorsView({
+ collection: model
+ });
+ $fixture.empty().appendTo($fixtures);
+ $fixture.html(view.render().el);
+ });
+
+ afterEach(() => {
+ view.collection.reset();
+ });
+
+ after(() => {
+ $fixture.remove();
+ });
+
+ it("Collection is empty", () => {
+ expect(view.el.innerHTML).toEqual('');
+ });
+
+ it("Add new sectors", () => {
+ view.collection.add([{}, {}]);
+ expect(view.el.children.length).toEqual(2);
});
- }
- };
-});
\ No newline at end of file
+ });
+ }
+};
diff --git a/test/specs/test_utils.js b/test/specs/test_utils.js
index 91f42d4e7..5f9a088a1 100644
--- a/test/specs/test_utils.js
+++ b/test/specs/test_utils.js
@@ -1,15 +1,15 @@
module.exports = {
- storageMock: function() {
+ storageMock() {
var db = {};
return {
id: 'testStorage',
- store: function(data){
+ store(data) {
db = data;
},
- load: function(keys){
+ load(keys) {
return db;
},
- getDb: function(){
+ getDb() {
return db;
},
};
diff --git a/test/specs/trait_manager/index.js b/test/specs/trait_manager/index.js
new file mode 100644
index 000000000..cbcdbed20
--- /dev/null
+++ b/test/specs/trait_manager/index.js
@@ -0,0 +1,23 @@
+const TraitManager = require('trait_manager');
+const TraitsModel = require('./model/TraitsModel');
+const TraitsView = require('./view/TraitsView');
+
+describe('TraitManager', () => {
+
+ describe('Main', () => {
+
+ var obj;
+
+ beforeEach(() => {
+ obj = new TraitManager().init();
+ });
+
+ afterEach(() => {
+ obj = null;
+ });
+
+ });
+
+ TraitsModel.run();
+ TraitsView.run();
+});
diff --git a/test/specs/trait_manager/main.js b/test/specs/trait_manager/main.js
deleted file mode 100644
index 92145e456..000000000
--- a/test/specs/trait_manager/main.js
+++ /dev/null
@@ -1,25 +0,0 @@
-define(function(require, exports, module){
- 'use strict';
- var TraitManager = require('TraitManager');
- var TraitsView = require('undefined');
-
- describe('TraitManager', function() {
-
- describe('Main', function() {
-
- var obj;
-
- beforeEach(function () {
- obj = new TraitManager().init();
- });
-
- afterEach(function () {
- delete obj;
- });
-
- });
-
- TraitsModel.run();
- TraitsView.run();
- });
-});
\ No newline at end of file
diff --git a/test/specs/trait_manager/model/TraitsModel.js b/test/specs/trait_manager/model/TraitsModel.js
index 0149dbae5..48c4dd545 100644
--- a/test/specs/trait_manager/model/TraitsModel.js
+++ b/test/specs/trait_manager/model/TraitsModel.js
@@ -1,34 +1,31 @@
-define(function(require, exports, module){
- 'use strict';
- var Trait = require('TraitManager/model/Trait');
- var Component = require('DomComponents/model/Component');
+const Trait = require('trait_manager/model/Trait');
+const Component = require('dom_components/model/Component');
- module.exports = {
- run: function(){
+module.exports = {
+ run() {
- describe('TraitModels', function() {
+ describe('TraitModels', () => {
- var obj;
- var target;
- var modelName = 'title';
+ var obj;
+ var target;
+ var modelName = 'title';
- beforeEach(function () {
- target = new Component();
- obj = new Trait({
- name: modelName,
- target: target,
- });
- });
+ beforeEach(() => {
+ target = new Component();
+ obj = new Trait({
+ name: modelName,
+ target,
+ });
+ });
- afterEach(function () {
- delete obj;
- });
+ afterEach(() => {
+ obj = null;
+ });
- it('Object exists', function() {
- Trait.should.be.exist;
- });
+ it('Object exists', () => {
+ expect(Trait).toExist();
+ });
- });
- }
- }
-});
\ No newline at end of file
+ });
+ }
+}
diff --git a/test/specs/trait_manager/view/TraitsView.js b/test/specs/trait_manager/view/TraitsView.js
index 261376662..488c21a74 100644
--- a/test/specs/trait_manager/view/TraitsView.js
+++ b/test/specs/trait_manager/view/TraitsView.js
@@ -1,75 +1,73 @@
-define(function(require, exports, module){
- 'use strict';
- var Trait = require('undefined');
- var Component = require('DomComponents/model/Component');
+const Trait = require('trait_manager/model/Trait');
+const TraitView = require('trait_manager/view/TraitView');
+const Component = require('dom_components/model/Component');
- module.exports = {
- run: function(){
+module.exports = {
+ run() {
- describe('TraitView', function() {
+ describe('TraitView', () => {
- var obj;
- var model;
- var modelName = 'title';
- var target;
+ var obj;
+ var model;
+ var modelName = 'title';
+ var target;
- beforeEach(function () {
- target = new Component();
- model = new Trait({
- name: modelName,
- target: target,
- });
- obj = new TraitView({
- model: model,
- });
- });
+ beforeEach(() => {
+ target = new Component();
+ model = new Trait({
+ name: modelName,
+ target,
+ });
+ obj = new TraitView({
+ model,
+ });
+ });
- afterEach(function () {
- delete obj;
- delete model;
- delete target;
- });
+ afterEach(() => {
+ obj = null;
+ model = null;
+ target = null;
+ });
- it('Object exists', function() {
- Trait.should.be.exist;
- });
+ it('Object exists', () => {
+ expect(Trait).toExist();
+ });
- it('Target has no attributes on init', function() {
- target.get('attributes').should.deep.equal({});
- });
+ it('Target has no attributes on init', () => {
+ expect(target.get('attributes')).toEqual({});
+ });
- it('On update of the value updates the target attributes', function() {
- model.set('value', 'test');
- var eq = {};
- eq[modelName] = 'test';
- target.get('attributes').should.deep.equal(eq);
- });
+ it('On update of the value updates the target attributes', () => {
+ model.set('value', 'test');
+ var eq = {};
+ eq[modelName] = 'test';
+ expect(target.get('attributes')).toEqual(eq);
+ });
- it('Updates on different models do not alter other targets', function() {
- var target1 = new Component();
- var target2 = new Component();
- var model1 = new Trait({
- name: modelName,
- target: target1,
- });
- var model2 = new Trait({
- name: modelName,
- target: target2,
- });
- var obj1 = new TraitView({model: model1});
- var obj2 = new TraitView({model: model2});
+ it('Updates on different models do not alter other targets', () => {
+ var target1 = new Component();
+ var target2 = new Component();
+ var model1 = new Trait({
+ name: modelName,
+ target: target1,
+ });
+ var model2 = new Trait({
+ name: modelName,
+ target: target2,
+ });
+ var obj1 = new TraitView({model: model1});
+ var obj2 = new TraitView({model: model2});
- model1.set('value', 'test1');
- model2.set('value', 'test2');
- var eq1 = {};
- eq1[modelName] = 'test1';
- var eq2 = {};
- eq2[modelName] = 'test2';
- target1.get('attributes').should.deep.equal(eq1);
- target2.get('attributes').should.deep.equal(eq2);
- });
+ model1.set('value', 'test1');
+ model2.set('value', 'test2');
+ var eq1 = {};
+ eq1[modelName] = 'test1';
+ var eq2 = {};
+ eq2[modelName] = 'test2';
+ expect(target1.get('attributes')).toEqual(eq1);
+ expect(target2.get('attributes')).toEqual(eq2);
+ });
- });
- }
- }
-});
\ No newline at end of file
+ });
+ }
+}
diff --git a/test/specs/utils/main.js b/test/specs/utils/main.js
index f0d351f8b..aa4a5f346 100644
--- a/test/specs/utils/main.js
+++ b/test/specs/utils/main.js
@@ -1,9 +1,9 @@
-define(function(require, exports, module){
+define((require, exports, module) => {
'use strict';
var Utils = require('Utils');
var Sorter = require('undefined');
- describe('Utils', function() {
+ describe('Utils', () => {
Sorter.run();
diff --git a/yarn.lock b/yarn.lock
index ce02b5415..16925d7fd 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -40,7 +40,13 @@ acorn-globals@^3.1.0:
dependencies:
acorn "^4.0.4"
-acorn@^3.1.0:
+acorn-jsx@^3.0.0:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b"
+ dependencies:
+ acorn "^3.0.4"
+
+acorn@^3.0.4, acorn@^3.1.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a"
@@ -48,11 +54,11 @@ acorn@^4.0.3, acorn@^4.0.4:
version "4.0.13"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.13.tgz#105495ae5361d697bd195c825192e1ad7f253787"
-acorn@^5.0.0:
+acorn@^5.0.0, acorn@^5.0.1:
version "5.0.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d"
-ajv-keywords@^1.1.1:
+ajv-keywords@^1.0.0, ajv-keywords@^1.1.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c"
@@ -79,6 +85,10 @@ ansi-escapes@^1.0.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
+ansi-escapes@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-2.0.0.tgz#5bae52be424878dd9783e8910e3fc2922e83c81b"
+
ansi-html@0.0.5:
version "0.0.5"
resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.5.tgz#0dcaa5a081206866bc240a3b773a184ea3b88b64"
@@ -91,6 +101,10 @@ ansi-regex@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107"
+ansi-regex@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
+
ansi-styles@^2.0.1, ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
@@ -214,10 +228,6 @@ async@^2.1.2:
dependencies:
lodash "^4.14.0"
-async@~0.2.6:
- version "0.2.10"
- resolved "https://registry.yarnpkg.com/async/-/async-0.2.10.tgz#b6bbe0b0674b9d719708ca38de8c237cb526c3d1"
-
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
@@ -958,6 +968,10 @@ balanced-match@^0.4.1:
version "0.4.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
+balanced-match@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
+
base64-js@^1.0.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.2.0.tgz#a39992d723584811982be5e290bb6a53d86700f1"
@@ -1022,6 +1036,13 @@ brace-expansion@^1.0.0:
balanced-match "^0.4.1"
concat-map "0.0.1"
+brace-expansion@^1.1.7:
+ version "1.1.8"
+ resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292"
+ dependencies:
+ balanced-match "^1.0.0"
+ concat-map "0.0.1"
+
braces@^1.8.2:
version "1.8.5"
resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7"
@@ -1137,6 +1158,16 @@ bytes@2.4.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/bytes/-/bytes-2.4.0.tgz#7d97196f9d5baf7f6935e25985549edd2a6c2339"
+caller-path@^0.1.0:
+ version "0.1.0"
+ resolved "https://registry.yarnpkg.com/caller-path/-/caller-path-0.1.0.tgz#94085ef63581ecd3daa92444a8fe94e82577751f"
+ dependencies:
+ callsites "^0.2.0"
+
+callsites@^0.2.0:
+ version "0.2.0"
+ resolved "https://registry.yarnpkg.com/callsites/-/callsites-0.2.0.tgz#afab96262910a7f33c19a5775825c69f34e350ca"
+
camelcase-keys@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
@@ -1179,7 +1210,7 @@ chai@^3.5.0:
deep-eql "^0.1.3"
type-detect "^1.0.0"
-chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1:
+chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies:
@@ -1226,12 +1257,26 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
dependencies:
inherits "^2.0.1"
+circular-json@^0.3.1:
+ version "0.3.1"
+ resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.1.tgz#be8b36aefccde8b3ca7aa2d6afc07a37242c0d2d"
+
cli-cursor@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987"
dependencies:
restore-cursor "^1.0.1"
+cli-cursor@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
+ dependencies:
+ restore-cursor "^2.0.0"
+
+cli-width@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.1.0.tgz#b234ca209b29ef66fc518d9b98d5847b00edf00a"
+
cliui@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
@@ -1325,6 +1370,14 @@ concat-stream@^1.0.0, concat-stream@^1.5.0, concat-stream@~1.5.0:
readable-stream "~2.0.0"
typedarray "~0.0.5"
+concat-stream@^1.6.0:
+ version "1.6.0"
+ resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7"
+ dependencies:
+ inherits "^2.0.3"
+ readable-stream "^2.2.2"
+ typedarray "^0.0.6"
+
connect-history-api-fallback@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.3.0.tgz#e51d17f8f0ef0db90a64fdb47de3051556e9f169"
@@ -1523,6 +1576,18 @@ defined@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
+del@^2.0.2:
+ version "2.2.2"
+ resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8"
+ dependencies:
+ globby "^5.0.0"
+ is-path-cwd "^1.0.0"
+ is-path-in-cwd "^1.0.0"
+ object-assign "^4.0.1"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+ rimraf "^2.2.8"
+
delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
@@ -1595,6 +1660,13 @@ doctrine@^1.1.0:
esutils "^2.0.2"
isarray "^1.0.0"
+doctrine@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.0.0.tgz#c73d8d2909d22291e1a007a395804da8b665fe63"
+ dependencies:
+ esutils "^2.0.2"
+ isarray "^1.0.0"
+
documentation@^4.0.0-beta2:
version "4.0.0-beta9"
resolved "https://registry.yarnpkg.com/documentation/-/documentation-4.0.0-beta9.tgz#8221b25286ce9563c7c9bb7710241255ccd2ee79"
@@ -1773,7 +1845,7 @@ escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
-escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2:
+escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
@@ -1788,14 +1860,87 @@ escodegen@1.8.x, escodegen@^1.6.1:
optionalDependencies:
source-map "~0.2.0"
+eslint-scope@^3.7.1:
+ version "3.7.1"
+ resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8"
+ dependencies:
+ esrecurse "^4.1.0"
+ estraverse "^4.1.1"
+
+eslint@^4.1.1:
+ version "4.1.1"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.1.1.tgz#facbdfcfe3e0facd3a8b80dc98c4e6c13ae582df"
+ dependencies:
+ babel-code-frame "^6.22.0"
+ chalk "^1.1.3"
+ concat-stream "^1.6.0"
+ debug "^2.6.8"
+ doctrine "^2.0.0"
+ eslint-scope "^3.7.1"
+ espree "^3.4.3"
+ esquery "^1.0.0"
+ estraverse "^4.2.0"
+ esutils "^2.0.2"
+ file-entry-cache "^2.0.0"
+ glob "^7.1.2"
+ globals "^9.17.0"
+ ignore "^3.3.3"
+ imurmurhash "^0.1.4"
+ inquirer "^3.0.6"
+ is-my-json-valid "^2.16.0"
+ is-resolvable "^1.0.0"
+ js-yaml "^3.8.4"
+ json-stable-stringify "^1.0.1"
+ levn "^0.3.0"
+ lodash "^4.17.4"
+ minimatch "^3.0.2"
+ mkdirp "^0.5.1"
+ natural-compare "^1.4.0"
+ optionator "^0.8.2"
+ path-is-inside "^1.0.2"
+ pluralize "^4.0.0"
+ progress "^2.0.0"
+ require-uncached "^1.0.3"
+ strip-json-comments "~2.0.1"
+ table "^4.0.1"
+ text-table "~0.2.0"
+
+espree@^3.4.3:
+ version "3.4.3"
+ resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.3.tgz#2910b5ccd49ce893c2ffffaab4fd8b3a31b82374"
+ dependencies:
+ acorn "^5.0.1"
+ acorn-jsx "^3.0.0"
+
esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.1:
version "2.7.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
+esprima@^3.1.1:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"
+
+esquery@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa"
+ dependencies:
+ estraverse "^4.0.0"
+
+esrecurse@^4.1.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.0.tgz#fa9568d98d3823f9a41d91e902dcab9ea6e5b163"
+ dependencies:
+ estraverse "^4.1.0"
+ object-assign "^4.0.1"
+
estraverse@^1.9.1:
version "1.9.3"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44"
+estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0:
+ version "4.2.0"
+ resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
+
esutils@^2.0.0, esutils@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.2.tgz#0abf4f1caa5bcb1f7a9d8acc6dea4faaa04bac9b"
@@ -1895,6 +2040,14 @@ extend@^3.0.0, extend@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4"
+external-editor@^2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.4.tgz#1ed9199da9cbfe2ef2f7a31b2fde8b0d12368972"
+ dependencies:
+ iconv-lite "^0.4.17"
+ jschardet "^1.4.2"
+ tmp "^0.0.31"
+
extglob@^0.3.1:
version "0.3.2"
resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1"
@@ -1921,6 +2074,19 @@ faye-websocket@~0.11.0:
dependencies:
websocket-driver ">=0.5.1"
+figures@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962"
+ dependencies:
+ escape-string-regexp "^1.0.5"
+
+file-entry-cache@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361"
+ dependencies:
+ flat-cache "^1.2.1"
+ object-assign "^4.0.1"
+
filename-regex@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.0.tgz#996e3e80479b98b9897f15a8a58b3d084e926775"
@@ -1966,6 +2132,15 @@ first-chunk-stream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e"
+flat-cache@^1.2.1:
+ version "1.2.2"
+ resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.2.2.tgz#fa86714e72c21db88601761ecf2f555d1abc6b96"
+ dependencies:
+ circular-json "^0.3.1"
+ del "^2.0.2"
+ graceful-fs "^4.1.2"
+ write "^0.2.1"
+
font-awesome@^4.7.0:
version "4.7.0"
resolved "https://registry.yarnpkg.com/font-awesome/-/font-awesome-4.7.0.tgz#8fa8cf0411a1a31afd07b06d2902bb9fc815a133"
@@ -2198,6 +2373,17 @@ glob@^7.0.5, glob@~7.1.1:
once "^1.3.0"
path-is-absolute "^1.0.0"
+glob@^7.1.2:
+ version "7.1.2"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
+ dependencies:
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
+
globals-docs@2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/globals-docs/-/globals-docs-2.2.0.tgz#28d9e2937cb9a6bce7e786510a5d4e337d61d3ef"
@@ -2206,6 +2392,10 @@ globals@^9.0.0:
version "9.14.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-9.14.0.tgz#8859936af0038741263053b39d0e76ca241e4034"
+globals@^9.17.0:
+ version "9.18.0"
+ resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
+
globby@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-4.1.0.tgz#080f54549ec1b82a6c60e631fc82e1211dbe95f8"
@@ -2217,6 +2407,17 @@ globby@^4.0.0:
pify "^2.0.0"
pinkie-promise "^2.0.0"
+globby@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d"
+ dependencies:
+ array-union "^1.0.1"
+ arrify "^1.0.0"
+ glob "^7.0.3"
+ object-assign "^4.0.1"
+ pify "^2.0.0"
+ pinkie-promise "^2.0.0"
+
globule@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/globule/-/globule-1.1.0.tgz#c49352e4dc183d85893ee825385eb994bb6df45f"
@@ -2421,10 +2622,22 @@ iconv-lite@0.4.13:
version "0.4.13"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2"
+iconv-lite@^0.4.17:
+ version "0.4.18"
+ resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.18.tgz#23d8656b16aae6742ac29732ea8f0336a4789cf2"
+
ieee754@^1.1.4:
version "1.1.8"
resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4"
+ignore@^3.3.3:
+ version "3.3.3"
+ resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.3.tgz#432352e57accd87ab3110e82d3fea0e47812156d"
+
+imurmurhash@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
+
in-publish@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/in-publish/-/in-publish-2.0.0.tgz#e20ff5e3a2afc2690320b6dc552682a9c7fadf51"
@@ -2446,7 +2659,7 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"
-inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.1:
+inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
@@ -2458,6 +2671,25 @@ ini@^1.3.3, ini@~1.3.0:
version "1.3.4"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e"
+inquirer@^3.0.6:
+ version "3.1.1"
+ resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.1.1.tgz#87621c4fba4072f48a8dd71c9f9df6f100b2d534"
+ dependencies:
+ ansi-escapes "^2.0.0"
+ chalk "^1.0.0"
+ cli-cursor "^2.1.0"
+ cli-width "^2.0.0"
+ external-editor "^2.0.4"
+ figures "^2.0.0"
+ lodash "^4.3.0"
+ mute-stream "0.0.7"
+ run-async "^2.2.0"
+ rx-lite "^4.0.8"
+ rx-lite-aggregates "^4.0.8"
+ string-width "^2.0.0"
+ strip-ansi "^3.0.0"
+ through "^2.3.6"
+
interpret@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.0.3.tgz#cbc35c62eeee73f19ab7b10a801511401afc0f90"
@@ -2590,6 +2822,10 @@ is-fullwidth-code-point@^1.0.0:
dependencies:
number-is-nan "^1.0.0"
+is-fullwidth-code-point@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f"
+
is-generator-function@^1.0.6:
version "1.0.6"
resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.6.tgz#9e71653cd15fff341c79c4151460a131d31e9fc4"
@@ -2619,6 +2855,15 @@ is-my-json-valid@^2.12.4:
jsonpointer "^4.0.0"
xtend "^4.0.0"
+is-my-json-valid@^2.16.0:
+ version "2.16.0"
+ resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693"
+ dependencies:
+ generate-function "^2.0.0"
+ generate-object-property "^1.1.0"
+ jsonpointer "^4.0.0"
+ xtend "^4.0.0"
+
is-number-object@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.3.tgz#f265ab89a9f445034ef6aff15a8f00b00f551799"
@@ -2629,6 +2874,22 @@ is-number@^2.0.2, is-number@^2.1.0:
dependencies:
kind-of "^3.0.2"
+is-path-cwd@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
+
+is-path-in-cwd@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.0.tgz#6477582b8214d602346094567003be8a9eac04dc"
+ dependencies:
+ is-path-inside "^1.0.0"
+
+is-path-inside@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.0.tgz#fc06e5a1683fbda13de667aff717bbc10a48f37f"
+ dependencies:
+ path-is-inside "^1.0.1"
+
is-posix-bracket@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz#3334dc79774368e92f016e6fbc0a88f5cd6e6bc4"
@@ -2637,6 +2898,10 @@ is-primitive@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575"
+is-promise@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa"
+
is-property@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84"
@@ -2653,6 +2918,12 @@ is-relative@^0.2.1:
dependencies:
is-unc-path "^0.1.1"
+is-resolvable@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/is-resolvable/-/is-resolvable-1.0.0.tgz#8df57c61ea2e3c501408d100fb013cf8d6e0cc62"
+ dependencies:
+ tryit "^1.0.1"
+
is-ssh@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/is-ssh/-/is-ssh-1.3.0.tgz#ebea1169a2614da392a63740366c3ce049d8dff6"
@@ -2759,10 +3030,21 @@ js-yaml@3.x, js-yaml@^3.3.1:
argparse "^1.0.7"
esprima "^2.6.0"
+js-yaml@^3.8.4:
+ version "3.8.4"
+ resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.8.4.tgz#520b4564f86573ba96662af85a8cafa7b4b5a6f6"
+ dependencies:
+ argparse "^1.0.7"
+ esprima "^3.1.1"
+
jsbn@~0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.0.tgz#650987da0dd74f4ebf5a11377a2aa2d273e97dfd"
+jschardet@^1.4.2:
+ version "1.4.2"
+ resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.4.2.tgz#2aa107f142af4121d145659d44f50830961e699a"
+
jsdom@^11.0.0:
version "11.0.0"
resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-11.0.0.tgz#1ee507cb2c0b16c875002476b1a8557d951353e5"
@@ -2873,7 +3155,7 @@ lcid@^1.0.0:
dependencies:
invert-kv "^1.0.0"
-levn@~0.3.0:
+levn@^0.3.0, levn@~0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
dependencies:
@@ -2978,6 +3260,10 @@ lodash@^4.0.0, lodash@^4.11.1, lodash@^4.13.1, lodash@^4.14.0, lodash@^4.17.2, l
version "4.17.2"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.2.tgz#34a3055babe04ce42467b607d700072c7ff6bf42"
+lodash@^4.17.4, lodash@^4.3.0:
+ version "4.17.4"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
+
lodash@~4.16.4:
version "4.16.6"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.16.6.tgz#d22c9ac660288f3843e16ba7d2b5d06cca27d777"
@@ -3134,13 +3420,13 @@ mime-db@~1.25.0:
version "1.25.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392"
-mime-types@^2.1.12, mime-types@~2.1.7:
+mime-types@^2.1.12, mime-types@~2.1.11, mime-types@~2.1.7:
version "2.1.13"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88"
dependencies:
mime-db "~1.25.0"
-mime-types@~2.1.11, mime-types@~2.1.15:
+mime-types@~2.1.15:
version "2.1.15"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.15.tgz#a4ebf5064094569237b8cf70046776d09fc92aed"
dependencies:
@@ -3150,6 +3436,10 @@ mime@1.3.4, mime@^1.3.4:
version "1.3.4"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53"
+mimic-fn@^1.0.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18"
+
minimalistic-assert@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3"
@@ -3164,6 +3454,12 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
dependencies:
brace-expansion "^1.0.0"
+minimatch@^3.0.4:
+ version "3.0.4"
+ resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
+ dependencies:
+ brace-expansion "^1.1.7"
+
minimist@0.0.8, minimist@~0.0.1:
version "0.0.8"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
@@ -3225,10 +3521,18 @@ ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
+mute-stream@0.0.7:
+ version "0.0.7"
+ resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
+
nan@^2.1.0, nan@^2.3.0, nan@^2.3.2:
version "2.4.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.4.0.tgz#fb3c59d45fe4effe215f0b890f8adf6eb32d2232"
+natural-compare@^1.4.0:
+ version "1.4.0"
+ resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
+
negotiator@0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.1.tgz#2b327184e8992101177b28563fb5e7102acd0ca9"
@@ -3434,6 +3738,12 @@ onetime@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
+onetime@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
+ dependencies:
+ mimic-fn "^1.0.0"
+
opn@4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95"
@@ -3448,7 +3758,7 @@ optimist@^0.6.1:
minimist "~0.0.1"
wordwrap "~0.0.2"
-optionator@^0.8.1:
+optionator@^0.8.1, optionator@^0.8.2:
version "0.8.2"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
dependencies:
@@ -3486,7 +3796,7 @@ os-locale@^1.4.0:
dependencies:
lcid "^1.0.0"
-os-tmpdir@^1.0.0, os-tmpdir@^1.0.1:
+os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274"
@@ -3602,6 +3912,10 @@ path-is-absolute@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f"
+path-is-inside@^1.0.1, path-is-inside@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53"
+
path-platform@~0.11.15:
version "0.11.15"
resolved "https://registry.yarnpkg.com/path-platform/-/path-platform-0.11.15.tgz#e864217f74c36850f0852b78dc7bf7d4a5721bf2"
@@ -3654,6 +3968,10 @@ plur@^2.0.0:
dependencies:
irregular-plurals "^1.0.0"
+pluralize@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-4.0.0.tgz#59b708c1c0190a2f692f1c7618c446b052fd1762"
+
pn@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/pn/-/pn-1.0.0.tgz#1cf5a30b0d806cd18f88fc41a6b5d4ad615b3ba9"
@@ -3686,6 +4004,10 @@ process@^0.11.0:
version "0.11.10"
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"
+progress@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f"
+
protocols@^1.1.0, protocols@^1.4.0:
version "1.4.3"
resolved "https://registry.yarnpkg.com/protocols/-/protocols-1.4.3.tgz#635b1c0785f0b389e8a012df1b1afffda9608b76"
@@ -3834,7 +4156,7 @@ readable-stream@^2.0.2, readable-stream@~2.0.0:
string_decoder "~0.10.x"
util-deprecate "~1.0.1"
-readable-stream@^2.2.6, readable-stream@^2.2.9:
+readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9:
version "2.2.9"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.9.tgz#cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8"
dependencies:
@@ -4038,10 +4360,21 @@ require-main-filename@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1"
+require-uncached@^1.0.3:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3"
+ dependencies:
+ caller-path "^0.1.0"
+ resolve-from "^1.0.0"
+
requires-port@1.0.x, requires-port@1.x.x:
version "1.0.0"
resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
+resolve-from@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-1.0.1.tgz#26cbfe935d1aeeeabb29bc3fe5aeb01e93d44226"
+
resolve@1.1.7, resolve@1.1.x, resolve@^1.1.3, resolve@^1.1.6:
version "1.1.7"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
@@ -4053,6 +4386,13 @@ restore-cursor@^1.0.1:
exit-hook "^1.0.0"
onetime "^1.0.0"
+restore-cursor@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
+ dependencies:
+ onetime "^2.0.0"
+ signal-exit "^3.0.2"
+
right-align@^0.1.1:
version "0.1.3"
resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef"
@@ -4063,7 +4403,7 @@ rimraf@2:
version "2.2.8"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582"
-rimraf@~2.5.1, rimraf@~2.5.4:
+rimraf@^2.2.8, rimraf@~2.5.1, rimraf@~2.5.4:
version "2.5.4"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04"
dependencies:
@@ -4076,6 +4416,22 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
hash-base "^2.0.0"
inherits "^2.0.1"
+run-async@^2.2.0:
+ version "2.3.0"
+ resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
+ dependencies:
+ is-promise "^2.1.0"
+
+rx-lite-aggregates@^4.0.8:
+ version "4.0.8"
+ resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be"
+ dependencies:
+ rx-lite "*"
+
+rx-lite@*, rx-lite@^4.0.8:
+ version "4.0.8"
+ resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444"
+
safe-buffer@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7"
@@ -4181,6 +4537,10 @@ signal-exit@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.1.tgz#5a4c884992b63a7acd9badb7894c3ee9cfccad81"
+signal-exit@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
+
sinon@^1.17.6:
version "1.17.6"
resolved "https://registry.yarnpkg.com/sinon/-/sinon-1.17.6.tgz#a43116db59577c8296356afee13fafc2332e58e1"
@@ -4194,6 +4554,10 @@ slash@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
+slice-ansi@0.0.4:
+ version "0.0.4"
+ resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"
+
sntp@1.x.x:
version "1.0.9"
resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198"
@@ -4354,6 +4718,13 @@ string-width@^1.0.0, string-width@^1.0.1, string-width@^1.0.2:
is-fullwidth-code-point "^1.0.0"
strip-ansi "^3.0.0"
+string-width@^2.0.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.0.tgz#030664561fc146c9423ec7d978fe2457437fe6d0"
+ dependencies:
+ is-fullwidth-code-point "^2.0.0"
+ strip-ansi "^4.0.0"
+
string_decoder@^0.10.25, string_decoder@~0.10.x:
version "0.10.31"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
@@ -4381,6 +4752,12 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1:
dependencies:
ansi-regex "^2.0.0"
+strip-ansi@^4.0.0:
+ version "4.0.0"
+ resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f"
+ dependencies:
+ ansi-regex "^3.0.0"
+
strip-bom-stream@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-1.0.0.tgz#e7144398577d51a6bed0fa1994fa05f43fd988ee"
@@ -4400,7 +4777,7 @@ strip-indent@^1.0.1:
dependencies:
get-stdin "^4.0.1"
-strip-json-comments@^2.0.0:
+strip-json-comments@^2.0.0, strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
@@ -4443,6 +4820,17 @@ symbol-tree@^3.2.1:
version "3.2.2"
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6"
+table@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/table/-/table-4.0.1.tgz#a8116c133fac2c61f4a420ab6cdf5c4d61f0e435"
+ dependencies:
+ ajv "^4.7.0"
+ ajv-keywords "^1.0.0"
+ chalk "^1.1.1"
+ lodash "^4.0.0"
+ slice-ansi "0.0.4"
+ string-width "^2.0.0"
+
tapable@^0.2.5, tapable@~0.2.5:
version "0.2.6"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-0.2.6.tgz#206be8e188860b514425375e6f1ae89bfb01fd8d"
@@ -4468,7 +4856,7 @@ tar@^2.0.0, tar@~2.2.1:
fstream "^1.0.2"
inherits "2"
-text-table@^0.2.0:
+text-table@^0.2.0, text-table@~0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
@@ -4493,7 +4881,7 @@ through2@^2.0.0, through2@~2.0.0:
readable-stream "~2.0.0"
xtend "~4.0.0"
-"through@>=2.2.7 <3":
+"through@>=2.2.7 <3", through@^2.3.6:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
@@ -4518,6 +4906,12 @@ tmatch@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/tmatch/-/tmatch-2.0.1.tgz#0c56246f33f30da1b8d3d72895abaf16660f38cf"
+tmp@^0.0.31:
+ version "0.0.31"
+ resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.31.tgz#8f38ab9438e17315e5dbd8b3657e8bfb277ae4a7"
+ dependencies:
+ os-tmpdir "~1.0.1"
+
to-absolute-glob@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz#1cdfa472a9ef50c239ee66999b662ca0eb39937f"
@@ -4568,6 +4962,10 @@ trim@0.0.1, trim@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd"
+tryit@^1.0.1:
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/tryit/-/tryit-1.0.3.tgz#393be730a9446fd1ead6da59a014308f36c289cb"
+
ttf2eot@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ttf2eot/-/ttf2eot-2.0.0.tgz#8e6337a585abd1608a0c84958ab483ce69f6654b"
@@ -4625,20 +5023,11 @@ type-is@~1.6.10, type-is@~1.6.15:
media-typer "0.3.0"
mime-types "~2.1.15"
-typedarray@~0.0.5:
+typedarray@^0.0.6, typedarray@~0.0.5:
version "0.0.6"
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
-uglify-js@^2.6:
- version "2.7.5"
- resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.7.5.tgz#4612c0c7baaee2ba7c487de4904ae122079f2ca8"
- dependencies:
- async "~0.2.6"
- source-map "~0.5.1"
- uglify-to-browserify "~1.0.0"
- yargs "~3.10.0"
-
-uglify-js@^2.8.27:
+uglify-js@^2.6, uglify-js@^2.8.27:
version "2.8.27"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.27.tgz#47787f912b0f242e5b984343be8e35e95f694c9c"
dependencies:
@@ -5032,6 +5421,12 @@ wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
+write@^0.2.1:
+ version "0.2.1"
+ resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757"
+ dependencies:
+ mkdirp "^0.5.1"
+
xml-name-validator@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-2.0.1.tgz#4d8b8f1eccd3419aa362061becef515e1e559635"