Is it possible to call a Javascript function (that's private) inside the object A from an object that inherits from A?
<p>I want to be able to test some inner functions that I have without putting the Javascript test code in the same file. I've been trying to inherit the class that has the inner functions, and then adding wrapper functions to make them public, like this:</p>

<pre><code>copyPrototype(TrafficChartCanvas_test, TrafficChartCanvas);

function TrafficChartCanvas_test() {

    TrafficChartCanvas_test.prototype.test_getYScale = function(reach) {
        return getYScale(reach);
    }
}
</code></pre>

<p>Assume copyPrototype successfully assigns the prototype of TrafficChartCanvas to that of TrafficChartCanvas_test. Here's part of the file I'm attempting to test:</p>

<pre><code>function TrafficChartCanvas(...) {

    // some other stuff here... public functions, etc.

    function getYScale(reach) {
        ...
    }
}
</code></pre>

<p>However, this doesn't work for me. Is there any other way I can do this?</p>
