Open tunnckoCore opened 9 years ago
the proof
note Undertaker is awesome!
possible problems
beforeEach
and afterEach
ideaplus
Soon will be commited to own repos and published.
Goddie will power more awesome task, test and bench runners than Undertaker can currently.
Erasm, Mukla, Berck, Docks, Ock, Bruck, Barrack, Blitzcrank, benz, godware, goddie.
Tasck
- Task runner in 50 linesErasm
- Task runner with array dependenciesMukla
- Test runner built with UndertakerMuckla
- Test runner built with GodwareBerck
- Bench runner built with UndertakerBruck
- Bench runner built with GodwareOck
- Project generator and scaffolderDocks
- Documentation generator and scaffolderBlitzcrank
- Library for interactive command line user interfacesbenz
- Control flow utopiavez
- Middleware composition library built with benz
names
goddie
godware
future assertion
// .ok(value, [message]) / .truthy
// Assert that value is truthy.
// .notOk(value, [message]) / .falsey
// Assert that value is falsy.
// .true(value, [message])
// Assert that value is true.
// .false(value, [message])
// Assert that value is false.
// .is(value, expected, [message]) - not strict / (.equal - strict?) / (.strictEqual - maybe as .same fallback)
// Assert that value is (strict) equal to expected.
// .not(value, expected, [message]) - not strict / (.notEqual - strict?) / (.notStrictEqual - maybe as .notSame fallback)
// Assert that value is not (strict) equal to expected.
// .same(value, expected, [message]) / .deepEqual / .deep
// Assert that value is deep equal to expected.
// .notSame(value, expected, [message]) / .notDeepEqual / .notDeep
// Assert that value is not deep equal to expected.
// .ifError(value, [message])
// Assert that value is error.
// experimental thoughts
mukla('package-name header')
.parallel(function () {
return this
.equal('fs.readFile should be function', typeof fs.readFile, 'function')
.true('not have body property', isEmptyFunction('(a) => {}'))
.same('abc should be [1, 2, 3]', abc, [1, 2, 3])
.true('fs.readFile should be function', Array.isArray([1, 2]))
.it('should have some test title', function (cb) {
mukla.plan(3)
fs.readFile('./package.json', function (err, res) {
mukla.ifError(err)
mukla.equal(typeof res, 'function')
mukla.equal(JSON.parse(res).name, 'mukla')
cb() // or mukla.end()
})
})
.series(function () {
return this
.true('not have body property', isEmptyFunction('(a) => {}'))
.same('abc should be [1, 2, 3]', abc, [1, 2, 3])
.equal('fs.readFile should be function', typeof fs.readFile, 'function')
})
})
.on('pass', function (title, info) {
console.log('ok:', title, info)
})
Actually they are same things.
One basic task runner, actually, is just simple event emitter.