From 0dab7add8d774c9a82c1b0e17704c37c5196244f Mon Sep 17 00:00:00 2001 From: Michel Beloshitsky Date: Fri, 4 Sep 2015 00:21:37 +0500 Subject: [PATCH] Added test to ensure names loading --- spec/api.load-spec.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spec/api.load-spec.js b/spec/api.load-spec.js index fbea981..baaf28f 100644 --- a/spec/api.load-spec.js +++ b/spec/api.load-spec.js @@ -40,6 +40,20 @@ describe('c3 api load', function () { }, 500); }); + it('should load axes names', function (done) { + var legend = chart.internal.legend; + chart.load({ + names: { + 'data1': 'Data 1 Title' + } + }); + setTimeout(function () { + var legendItem = legend.select('.c3-legend-item.c3-legend-item-data1 text'); + expect(legendItem.text()).toBe('Data 1 Title'); + done(); + }, 500); + }); + }); });