title: Mocha: create and finalize test programmatically
body: <p>I want to proxy test results running on other environment in real time.</p>
  
  <p>Here is some pseudo code that I want to make real:</p>
  
  <pre><code>  var test = proxy.getCurrentTest(); 
    // =&gt; {slow: 200, timeout: 2000, duration: 235, result: 'error'};
  
    var tmpIt = it('test1', function(){
        this.slow(test.slow);
        this.timeout(test.timeout);
    });
    tmpIt.close({
        duration: test.duration,
        result: test.result
    });
    // this should make this test red in the output, 
    // because the `result` is not 'success'
  </code></pre>
  
  <p>Is it anyhow possible to set test's result and duration without "really" running it? And get all the visual mocha output to the terminal?</p>
  
  <p><strong>edit:</strong> this question is not about how to pass variables with the test results form the child process to the main process. it's already working for me.</p>