appc-cli-expressjs
Version:
create an express server project
47 lines (39 loc) • 841 B
JavaScript
var fs = require('fs-extra'),
path = require('path'),
plugin = require('../appc'),
should = require('should');
var TMP = path.resolve('tmp');
var CREATE_OPTS = {
name: 'tmp',
id: 'com.tmp',
workspace: TMP,
logLevel: 'error'
};
var RUN_OPTS = {
workspace: TMP,
logLevel: 'info'
};
var appc = {
log: {
warn: function(){}
}
};
describe('appc-cli-expressjs', function() {
before(function() {
this._warn = appc.log.warn;
});
afterEach(function() {
fs.removeSync(TMP);
appc.log.warn = this._warn;
});
it('exists', function() {
should.exist(plugin);
plugin.should.be.an.Object;
});
it('exports new implementation plugin', function() {
plugin.new.should.be.an.Object;
plugin.new.type.should.equal('expressjs');
plugin.new.subtype.should.equal('server');
plugin.new.execute.should.be.a.Function;
});
});