Q:

Variable scope and inheritance for QUnit tests in PhantomJS

I have some code which seems to work in every environment except when running it in PhantomJS, which I am using for testing purposes in a headless CI environment.
Here's the code:
function NumericalAxis (variable1, variable2) {
    do something with variable2
    GenericAxis.call(this, variable1);
}

NumericalAxis.prototype = Object.create(GenericAxis.prototype);

Object.assign(NumericalAxis.prototype, {
    init: function(...) {
        do something
    },

    ...
});

When running in PhantomJS, I get a "Can't find variable: GenericAxis". Could anybody enlighten me on some poor practice I might have applied, or some obscure manner in which PhantomJS evaluates the code ?
Thanks,
Ryan

A:

The issue is with Object.assign which is not supported in PhantomJS, since it is part of ES2015
see: https://github.com/wallabyjs/public/issues/579

