mozilla / missioncontrol

Real-time monitoring of Firefox release health
Mozilla Public License 2.0
21 stars 18 forks source link

Adds Test for measureTable component #336

Closed kagehina919 closed 6 years ago

kagehina919 commented 6 years ago

@wlach I have written one test for the component measureTable. How should we get the sampleMeasures and sampleVersions for testing? I have used one sample value but how I can use the actions and reducers to fetch it inside the test?

kagehina919 commented 6 years ago

@wlach CircleCI couldn't auto-generate snapshots folder. The tests pass now as I added an update flag while testing in bin/build: yarn test -- -u which lets CircleCI generate the folder. I thought it might be better to not add snapshots folder to git.

wlach commented 6 years ago

I think you are supposed to commit snapshots to the repository -- that way we'll notice if they ever change. :) https://jestjs.io/docs/en/snapshot-testing

kagehina919 commented 6 years ago

@wlach added __snapshots__ directory. Please review.

kagehina919 commented 6 years ago

@wlach Added test to check it should not render the measures table when measures is an empty list. Please review. Fixes #335.

wlach commented 6 years ago

Looks great now, thank you!