[factory-sensors] Add test for temperature of 0 degrees

Hi, everyone!

I propose that the Factory Sensors exercise should reject solutions with !temperature (PR here).

The exercise requires that students make distinction between nulls and numbers. Zero degrees Celsius is a valid temperature. There’s no intentional reason to exclude only 0 of the whole set of numbers.

The existing exemplar solution seems to support my reasoning; it uses

if (temperature === null) {
  throw new ArgumentError();
}
2 Likes

Makes sense to me.

Thanks. I merged it!

Thank you!

1 Like