Rewrite tests to use ES6 modules.