Add tests for https://github.com/codeparty/tracks/pull/13

(and convert tests to JS)