D3 Bar Chart-last test only passing sometimes

My bar chart project passes sometimes and other times it seems to reformat the string some how. I have no idea why this is happening . the test is the last one on the list or #2 under tooltip

Tooltip's "data-date" property should be equal to the active area's "data-date" property: expected '1960-4-01' to equal '1960-04-01'

for some reason, not every time just sometimes it removes a zero. If you refresh the page and run the test sometimes it passes and sometimes it doesnt