The json data has months ranging from 1 to 12, so I built around that range.
But I’m getting this error:
“data-month should be at most 11: expected 12 to be at most 11
AssertionError: data-month should be at most 11: expected 12 to be at most 11”
and previous to that I was getting … “should be at least 0: expected nan to be at least 0”
But my months are within range of the json data. I saw no need to change the month values to a 0 to 11 range.
In order to get it to pass the test for “data-month” property/attr, I had to do
.attr("data-month", d => d.month - 1)
which leads me to kindly say:
I believe shouldn’t have been necessary because this particular test-suite test should have been geared toward the json month data or allow for a 1 to 12 month range input too.
But, I’m still learning and improving in coding and maybe y’all have a good reason for that, but if so, I’d like to hear why.
Here’s my unrefactored codepen I’m still working on: https://codepen.io/nwbnwb/pen/eYzOqRV?editors=0010