Use the stack filter correctly
require("referee-sinon");
require("buster-sinon");
var referee = require("referee");
var test = require("buster-test");
var formatio = require("formatio");
var stackFilter = require("stack-filter").configure({
    filters: ["buster-node/lib", "buster-node/node_modules"],
    cwd: process.cwd()
});

var formatter = formatio.configure({ quoteStrings: true });
referee.format = formatter.ascii.bind(formatter);

module.exports = {
    referee: referee,
    assert: referee.assert,
    refute: referee.refute,
    expect: referee.expect
};

// Expose buster test sub modules
for (var exp in test) {
    module.exports[exp] = test[exp];
}

// Configure assertion counting
test.testRunner.onCreate(function (runner) {
    referee.on("pass", function () {
        runner.assertionPass();
    });
});

// Configure automagic runner
var runner = test.autoRun({ stackFilter: stackFilter }, {
    end: function (results) {
        if (!results.ok) { process.exit(1); }
    }
});

test.testContext.on("create", runner);

require("referee-sinon");
require("buster-sinon");
var referee = require("referee");
var test = require("buster-test");
var formatio = require("formatio");
var stackFilter = require("stack-filter");
stackFilter.filters.push("buster-node/lib");

var formatter = formatio.configure({ quoteStrings: true });
referee.format = formatter.ascii.bind(formatter);

module.exports = {
    referee: referee,
    assert: referee.assert,
    refute: referee.refute,
    expect: referee.expect
};

// Expose buster test sub modules
for (var exp in test) {
    module.exports[exp] = test[exp];
}

// Configure assertion counting
test.testRunner.onCreate(function (runner) {
    referee.on("pass", function () {
        runner.assertionPass();
    });
});

// Configure automagic runner
var runner = test.autoRun({}, {
    end: function (results) {
        if (!results.ok) { process.exit(1); }
    }
});

test.testContext.on("create", runner);
