[test/mode_test.js] Remove some obsolete cruft
[tests] Overhaul mode testing framework

Tests are now specified in a less redundant format, and should be
easier to read and write.