[test] Move to tape in preparation for browser testing
[test] Minor refactor to make tests work with testling