/*global describe, it*/
/*
 * mochify.js
 *
 * Copyright (c) 2014 Maximilian Antoni <mail@maxantoni.de>
 *
 * @license MIT
 */
'use strict';

var assert = require('assert');
var run    = require('./fixture/run');


describe('stack', function () {
  this.timeout(3000);

  it('does not screw up xunit', function (done) {
    run('passes', ['-R', 'xunit'], function (code, stdout) {
      var lines = stdout.split('\n');
      assert.equal(lines[1],
          '<testcase classname="test" name="passes" time="0"/>');
      assert.equal(lines[2], '</testsuite>');
      assert.equal(code, 0);
      done();
    });
  });

});

/*global describe, it*/
/*
 * mochify.js
 *
 * Copyright (c) 2014 Maximilian Antoni <mail@maxantoni.de>
 *
 * @license MIT
 */
'use strict';

var assert = require('assert');
var run    = require('./fixture/run');


describe('stack', function () {
  this.timeout(3000);

  it('does not screw up xunit', function (done) {
    run('passes', ['-R', 'xunit'], function (code, stdout) {
      var lines = stdout.split('\n');
      assert.equal(lines[1].substring(0, lines[1].length - 3),
          '<testcase classname="test" name="passes" time="0');
      assert.equal(lines[2], '</testsuite>');
      assert.equal(code, 0);
      done();
    });
  });

});

Fix test case to not fail due to varying timings
Fix test case to not fail due to varying timings

The xunit output contains the time it took to run the tests.
It's sometimes 0 and sometimes 0.001.