padding: 10,
reverse: false,
show: true,
- template: "<%=value%>"
+ callback: merged.scales.yAxes[1].ticks.callback, // make it nicer, then check explicitly below
},
type: 'linear'
}, {
padding: 10,
reverse: false,
show: true,
- template: "<%=value%>"
+ callback: merged.scales.yAxes[2].ticks.callback, // make it nicer, then check explicitly below
},
type: 'linear'
}]
}
});
+
+ // Are these actually functions
+ expect(merged.scales.yAxes[1].ticks.callback).toEqual(jasmine.any(Function));
+ expect(merged.scales.yAxes[2].ticks.callback).toEqual(jasmine.any(Function));
});
it('should get value or default', function() {
padding: 10,
reverse: false,
show: true,
- template: "<%=value%>"
+ callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below
}
});
+
+ // Is this actually a function
+ expect(defaultConfig.ticks.callback).toEqual(jasmine.any(Function));
});
it('Should generate ticks from the data labales', function() {
padding: 10,
reverse: false,
show: true,
- template: "<%=value%>"
+ callback: defaultConfig.ticks.callback, // make this work nicer, then check below
}
});
+
+ expect(defaultConfig.ticks.callback).toEqual(jasmine.any(Function));
});
it('Should correctly determine the max & min data values', function() {
padding: 10,
reverse: false,
show: true,
- template: "<%var remain = value / (Math.pow(10, Math.floor(Chart.helpers.log10(value))));if (remain === 1 || remain === 2 || remain === 5) {%><%=value.toExponential()%><%} else {%><%= null %><%}%>",
+ callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below
},
});
+
+ // Is this actually a function
+ expect(defaultConfig.ticks.callback).toEqual(jasmine.any(Function));
});
it('Should correctly determine the max & min data values', function() {
reverse: false,
showLabelBackdrop: true,
show: true,
- template: "<%=value%>",
+ callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below
},
});
+
+ // Is this actually a function
+ expect(defaultConfig.ticks.callback).toEqual(jasmine.any(Function));
});
it('Should correctly determine the max & min data values', function() {
padding: 10,
reverse: false,
show: true,
- template: "<%=value%>"
+ callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below
},
time: {
format: false,
displayFormat: false,
}
});
+
+ // Is this actually a function
+ expect(defaultConfig.ticks.callback).toEqual(jasmine.any(Function));
});
it('should build ticks using days', function() {