I\'m trying to import an AMD module (ES6 module transpiled in ES5) in a protractor test. I\'m using the Page Object pattern. And the Page Object is the module I\'m trying to
You can also use amdefine as said Martin, but without prepending each file with
if (typeof define !== 'function') { var define = require('amdefine')(module) }
Just include "amdefine": ">=0.1.0"
in your devDependencies and add require('amdefine/intercept');
to onPrepare function in your protractor config.
It will automatically insert the above snippet in each .js file loaded by Node.