mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
update tests
This commit is contained in:
parent
5ace38c68f
commit
6ddd9f202c
2 changed files with 4 additions and 8 deletions
|
@ -457,7 +457,7 @@ define(function (require) {
|
|||
*/
|
||||
TileMap.prototype.addLegend = function (data, map) {
|
||||
var self = this;
|
||||
var isLegend = $(this.chartEl).find('div.tilemap-legend').length;
|
||||
var isLegend = $('div.tilemap-legend', this.chartEl).length;
|
||||
|
||||
if (isLegend) return; // Don't add Legend if already one
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ define(function (require) {
|
|||
it('should return an object', function () {
|
||||
vis.handler.charts.forEach(function (chart) {
|
||||
var data = chart.handler.data.data;
|
||||
expect(_.isObject(chart.getMinMax(data))).to.be(true);
|
||||
expect(chart.getMinMax(data)).to.be.an(Object);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -209,9 +209,7 @@ define(function (require) {
|
|||
vis.handler.charts.forEach(function (chart) {
|
||||
var data = chart.handler.data.data;
|
||||
var min = _.chain(data.geoJson.features)
|
||||
.map(function (n) {
|
||||
return n.properties.count;
|
||||
})
|
||||
.deepPluck('properties.count')
|
||||
.min()
|
||||
.value();
|
||||
expect(chart.getMinMax(data).min).to.be(min);
|
||||
|
@ -222,9 +220,7 @@ define(function (require) {
|
|||
vis.handler.charts.forEach(function (chart) {
|
||||
var data = chart.handler.data.data;
|
||||
var max = _.chain(data.geoJson.features)
|
||||
.map(function (n) {
|
||||
return n.properties.count;
|
||||
})
|
||||
.deepPluck('properties.count')
|
||||
.max()
|
||||
.value();
|
||||
expect(chart.getMinMax(data).max).to.be(max);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue