Tests-js files - how does test layers in flow work?

var ActionManagerTestScene = TestScene.extend({
    runThisTest:function (num) {
        ActionMgrTestIdx = (num || 0) - 1;
        this.addChild(nextActionMgrTest());
        director.runScene(this);
    }
});

this.addChild(nextActionMgrTest());
director.runScene(this);

What will happen to the previous scene/layer?
How was the previous scene/layer removed?