yaph / d3-geomap

A library for creating geographical maps based on D3.js
https://d3-geomap.github.io/
MIT License
133 stars 45 forks source link

Add tests for example maps and edge cases #60

Open yaph opened 4 years ago

yaph commented 4 years ago

The goal is to create tests for common use cases, as well as edge cases that should work with d3-geomap. For example missing values in a CSV file should not cause errors that stop the map from rendering.

To add a new test:

  1. Pick a map from the examples directory, that has no tests yet.
  2. Create a JavaScript file in the tests directory with the same name.
  3. Write code that tests what the example is meant to show, e.g. if the example shows how to add a custom legend, the test should at least check its visibility.

Take a look at the existing tests for additional guidance.