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

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

#1
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?