You aren't really testing that supportedSensors is an Array here. This test should still pass for strings. Strings also have an .length property and can be iterated returning individual string characters.

"abc".length = 3
"abc"[0] = "a"

I would recommend having an addition check before you iterate, to ensure it's indeed an array.
Perhaps an instanceof check or Array.isArray.