Down to 3 test failures

This commit is contained in:
Evert Timberg 2015-10-18 19:48:57 -04:00
parent 86a52d0302
commit d0475b8052
6 changed files with 25 additions and 7 deletions

View File

@ -244,7 +244,7 @@ describe('Core helper tests', function() {
padding: 10,
reverse: false,
show: true,
template: "<%=value%>"
callback: merged.scales.yAxes[1].ticks.callback, // make it nicer, then check explicitly below
},
type: 'linear'
}, {
@ -281,12 +281,16 @@ describe('Core helper tests', function() {
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() {

View File

@ -43,9 +43,12 @@ describe('Category scale tests', 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() {

View File

@ -42,9 +42,11 @@ describe('Linear Scale', 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() {

View File

@ -41,9 +41,12 @@ describe('Logarithmic Scale tests', 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() {

View File

@ -58,10 +58,13 @@ describe('Test the radial linear scale', 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() {

View File

@ -46,7 +46,7 @@ describe('Time scale tests', function() {
padding: 10,
reverse: false,
show: true,
template: "<%=value%>"
callback: defaultConfig.ticks.callback, // make this nicer, then check explicitly below
},
time: {
format: false,
@ -55,6 +55,9 @@ describe('Time scale tests', function() {
displayFormat: false,
}
});
// Is this actually a function
expect(defaultConfig.ticks.callback).toEqual(jasmine.any(Function));
});
it('should build ticks using days', function() {