apeman-proto-app
Version:
Prototype for app project.
72 lines (59 loc) • 1.48 kB
JavaScript
/**
* Test for inheritance.
* Runs with mocha.
*/
const apeman = require('apeman')
const mkdirp = require('mkdirp')
const fs = require('fs')
const assert = require('assert')
const co = require('co')
describe('inherit', () => {
let configuration = require.resolve('../doc/mocks/mock-Apemanfile.js')
let { $cwd } = require(configuration)
before(() => co(function * () {
mkdirp.sync($cwd)
fs.writeFileSync(
`${$cwd}/Apemanfile.js`,
`exports.$parent = '${configuration}';exports.$ctx = {colors:{}, loc: {}} ;exports.$wtchs = {}`
)
}))
it('Show tmpls.', () => co(function * () {
yield apeman.show('tmpls', {
configuration,
keysonly: true
})
}))
it('Show tasks.', () => co(function * () {
yield apeman.show('tasks', {
configuration,
keysonly: true
})
}))
it('Run tmpls.', () => co(function * () {
yield apeman.tmpl({
configuration
})
}))
it('Run mkdir tasks.', () => co(function * () {
yield apeman.task('app:mkdir', {
configuration
})
}))
it('Run render tasks.', () => co(function * () {
yield apeman.task('app:render', {
configuration
})
}))
it('Run fmt tasks.', () => co(function * () {
yield apeman.task('app:fmt', {
configuration
})
}))
it('List watch tasks.', () => co(function * () {
yield apeman.task('wtch:list', {
configuration
})
}))
})
/* global describe, before, after, it */