cylon/spec/helper.js

39 lines
703 B
JavaScript
Raw Normal View History

2015-04-15 12:49:12 +08:00
"use strict";
2015-04-15 12:49:12 +08:00
process.env.NODE_ENV = "test";
2015-04-15 12:49:12 +08:00
var path = require("path");
2015-04-15 12:49:12 +08:00
var chai = require("chai"),
sinon = require("sinon"),
sinonChai = require("sinon-chai");
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
global.lib = function(module) {
2015-04-15 12:49:12 +08:00
return require(path.normalize("./../lib/" + module));
};
2015-06-23 09:10:09 +08:00
var Cylon = require("./../");
Cylon.config({
mode: "manual",
logging: {
logger: false
}
});
Cylon.Logger.setup();