2015-04-15 12:49:12 +08:00
|
|
|
"use strict";
|
2014-05-25 01:34:09 +08:00
|
|
|
|
2015-04-15 12:49:12 +08:00
|
|
|
process.env.NODE_ENV = "test";
|
2014-05-25 01:34:09 +08:00
|
|
|
|
2015-04-15 12:49:12 +08:00
|
|
|
var path = require("path");
|
2014-05-25 01:34:09 +08:00
|
|
|
|
2015-04-15 12:49:12 +08:00
|
|
|
var chai = require("chai"),
|
|
|
|
sinon = require("sinon"),
|
|
|
|
sinonChai = require("sinon-chai");
|
2014-05-25 01:34:09 +08:00
|
|
|
|
|
|
|
chai.use(sinonChai);
|
|
|
|
|
|
|
|
global.chai = chai;
|
|
|
|
global.sinon = sinon;
|
|
|
|
|
|
|
|
global.should = chai.should();
|
|
|
|
global.expect = chai.expect;
|
|
|
|
global.assert = chai.assert;
|
|
|
|
global.AssertionError = chai.AssertionError;
|
|
|
|
|
|
|
|
global.spy = sinon.spy;
|
|
|
|
global.stub = sinon.stub;
|
|
|
|
|
|
|
|
// convenience function to require modules in lib directory
|
2015-06-09 22:21:03 +08:00
|
|
|
global.lib = function(module) {
|
2015-04-15 12:49:12 +08:00
|
|
|
return require(path.normalize("./../lib/" + module));
|
2014-05-25 01:34:09 +08:00
|
|
|
};
|
|
|
|
|
2015-06-23 09:10:09 +08:00
|
|
|
var Cylon = require("./../");
|
2014-09-09 05:12:14 +08:00
|
|
|
|
2014-09-23 02:37:24 +08:00
|
|
|
Cylon.config({
|
2014-09-23 06:04:11 +08:00
|
|
|
mode: "manual",
|
2015-09-02 01:18:17 +08:00
|
|
|
silent: true
|
2014-09-09 05:12:14 +08:00
|
|
|
});
|
|
|
|
|
2014-10-29 06:53:03 +08:00
|
|
|
Cylon.Logger.setup();
|