The tests were originally written in plain JS for the sake of speed. It would be probably good to add some type safety there.