fixing test (stacking happens for grouped charts as well to handle negative values correctly)

This commit is contained in:
ppisljar 2016-12-01 10:52:29 +01:00
parent 682ab0b22d
commit 69a53eaf26
2 changed files with 7 additions and 9 deletions

View file

@ -76,7 +76,7 @@ describe('Vislib VisConfig Class Test Suite', function () {
.node();
visConfig = new VisConfig({
type: 'histogram',
type: 'point_series',
el: el
}, data, new PersistedState());
}));
@ -88,7 +88,7 @@ describe('Vislib VisConfig Class Test Suite', function () {
it('should get the property', function () {
expect(visConfig.get('el')).to.be(el);
expect(visConfig.get('type')).to.be('histogram');
expect(visConfig.get('type')).to.be('point_series');
});
it('should return defaults if property does not exist', function () {
@ -96,7 +96,9 @@ describe('Vislib VisConfig Class Test Suite', function () {
});
it('should throw an error if property does not exist and defaults were not provided', function () {
expect(visConfig.get('this.does.not.exist')).to.throwError();
expect(function () {
visConfig.get('this.does.not.exist');
}).to.throwError();
});
});

View file

@ -69,12 +69,8 @@ dataTypesArray.forEach(function (dataType, i) {
});
});
it('should not stack values if grouped mode is set', function () {
if (mode === 'grouped') {
expect(isStacked).to.be(false);
} else {
expect(isStacked).to.be(true);
}
it('should stack values', function () {
expect(isStacked).to.be(true);
});
});