Closed EvanHahn closed 1 year ago
These may already be tested in co2.test.js
, so this may be a bad PR.
@EvanHahn thanks for this. It would actually be nice to reduce the number of tests in the co2.test.js
file, so happy to explore moving more to the OneByte & Sustainable Web Design tests into their own files.
Using toBeCloseTo() looks good, and will definitely make our test cases more flexible as grid intensity data changes.
Do you want to use the PR to add more tests to the 1byte.test.js
file. We can tackle the OneByte tests first, and then get on to the Sustainable Web Design tests in another PR.
It would actually be nice to reduce the number of tests in the
co2.test.js
file, so happy to explore moving more to the OneByte & Sustainable Web Design tests into their own files.
I removed two redundant tests from co2.test.js
in 0e6b4811e24cfa49cd29da90ebf894ca8111b649.
Do you want to use the PR to add more tests to the
1byte.test.js
file. We can tackle the OneByte tests first, and then get on to the Sustainable Web Design tests in another PR.
It looks like the OneByte
class is fully tested by this PR. What other tests would you like to see?
Again, feel free to message me on the CAT Slack or email me@evanhahn.com.
@EvanHahn thank you for this, looks good to me.
This test-only change:
perByte()
toBeCloseTo()
(see #98)