I have the following ES6 modules:
export function getDataFromServer() { return ... }
I recently discovered babel-plugin-mockable-imports which handles this problem neatly, IMHO. If you are already using Babel, it's worth looking into.