tests rewritten for mocha phantom js module