apeman-proto-app
Version:
Prototype for app project.
79 lines (65 loc) • 1.68 kB
JavaScript
/**
* Test for inheritance.
* Runs with mocha.
*/
;
const apeman = require('apeman'),
mkdirp = require('mkdirp'),
fs = require('fs'),
assert = require('assert');
describe('inherit', ()=> {
let mockApemanfile = require.resolve('../doc/mocks/mock-Apemanfile.js');
before((done) => {
mkdirp(require(mockApemanfile).$cwd, done);
});
it('Show tmpls.', (done) => {
apeman.show("tmpls", {
keysonly: true,
configuration: mockApemanfile
}, (err) => {
assert.ifError(err);
done();
});
});
it('Show tasks.', (done) => {
apeman.show("tasks", {
keysonly: true,
configuration: mockApemanfile
}, (err) => {
assert.ifError(err);
done();
});
});
it('Run tmpls.', (done) => {
apeman.tmpl({
configuration: mockApemanfile
}, (err) => {
assert.ifError(err);
done();
});
});
it('Run mkdir tasks.', (done) => {
apeman.task('app:mkdir', {
configuration: mockApemanfile
}, (err) => {
assert.ifError(err);
done();
});
});
it('Run render tasks.', (done) => {
apeman.task('app:render', {
configuration: mockApemanfile
}, (err) => {
assert.ifError(err);
done();
});
});
it('List watch tasks.', (done) => {
apeman.task('wtch:list', {
configuration: mockApemanfile
}, (err) => {
assert.ifError(err);
done();
});
});
});