RhoInc / Webcharts

Reusable, flexible, interactive charts with JavaScript
MIT License
34 stars 6 forks source link

Add unit tests for workflow improvements #183

Closed jwildfire closed 6 years ago

jwildfire commented 6 years ago

Write unit tests to cover #29, #176 and #180

jwildfire commented 6 years ago

Adding tests for the following:

  1. chart object is bound to div.wc-chart on createChart()
  2. control object is bound to div.wc-controls on createControls()
  3. each mark group has it's ID attached as a class
  4. config marks is copied to chart.marks
  5. d3.selection for g.supergroup element bound to each item in chart.marks array
  6. d3.selection for g.groups elements bound to each item in chart.marks array
  7. d3.selection for specific d3 marks (circles, paths, etc) bound to each item in chart.marks array expect for when type=bar
  8. d3.selection containing all mark supergroups bound as property to the chart.marks array object
  9. all expected data sets (initial_data, raw_data, filtered_data, current_data) are found after chart.draw is called