Browse Source

Added test for custom class in the factory function

pull/1289/head
Daniele Piccone 10 years ago
parent
commit
4b761481dd
  1. 6
      spec/core-spec.js

6
spec/core-spec.js

@ -4,6 +4,7 @@ describe('c3 chart', function () {
var chart; var chart;
var args = { var args = {
classname: 'customclass',
data: { data: {
columns: [ columns: [
['data1', 30, 200, 100, 400, 150, 250], ['data1', 30, 200, 100, 400, 150, 250],
@ -34,6 +35,11 @@ describe('c3 chart', function () {
expect(svg).not.toBeNull(); expect(svg).not.toBeNull();
}); });
it('should be created with a custom class', function () {
var svg = d3.select('#chart svg');
expect(svg.attr('class')).not.toBeNull();
expect(svg.attr('class')).toBe('customclass');
});
}); });
describe('size', function () { describe('size', function () {

Loading…
Cancel
Save