From: Evert Timberg Date: Sun, 18 Oct 2015 23:48:57 +0000 (-0400) Subject: Down to 3 test failures X-Git-Tag: 2.0.0-beta~4^2~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d0475b8052ec0c9213d579c702c387d0c515b859;p=thirdparty%2FChart.js.git Down to 3 test failures --- diff --git a/test/core.helpers.tests.js b/test/core.helpers.tests.js index ce0c98757..0320a84aa 100644 --- a/test/core.helpers.tests.js +++ b/test/core.helpers.tests.js @@ -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() { diff --git a/test/scale.category.tests.js b/test/scale.category.tests.js index d6ec96f96..e5ac45a29 100644 --- a/test/scale.category.tests.js +++ b/test/scale.category.tests.js @@ -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() { diff --git a/test/scale.linear.tests.js b/test/scale.linear.tests.js index dd31c7bce..d0378ed24 100644 --- a/test/scale.linear.tests.js +++ b/test/scale.linear.tests.js @@ -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() { diff --git a/test/scale.logarithmic.tests.js b/test/scale.logarithmic.tests.js index ea1092749..72250df73 100644 --- a/test/scale.logarithmic.tests.js +++ b/test/scale.logarithmic.tests.js @@ -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() { diff --git a/test/scale.radialLinear.tests.js b/test/scale.radialLinear.tests.js index 5a7620789..0b2512e9b 100644 --- a/test/scale.radialLinear.tests.js +++ b/test/scale.radialLinear.tests.js @@ -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() { diff --git a/test/scale.time.tests.js b/test/scale.time.tests.js index eb573df4a..1fbd9ab88 100644 --- a/test/scale.time.tests.js +++ b/test/scale.time.tests.js @@ -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() {