1 |
|
2 |
|
3 |
|
4 |
|
5 | 'use strict'
|
6 |
|
7 | const define = require('../lib/define.js')
|
8 | const co = require('co')
|
9 | const assert = require('assert')
|
10 | const mkdirp = require('mkdirp')
|
11 |
|
12 | const tmpDir = `${__dirname}/../`
|
13 | const noop = () => undefined
|
14 |
|
15 | describe('define', () => {
|
16 | before(() => co(function * () {
|
17 | mkdirp.sync(tmpDir)
|
18 | }))
|
19 |
|
20 | after(() => co(function * () {
|
21 |
|
22 | }))
|
23 |
|
24 | it('Define', () => co(function * () {
|
25 | let task = define({})
|
26 | assert.ok(task)
|
27 | let context = {
|
28 | verbose: false,
|
29 | logger: {
|
30 | info: noop,
|
31 | debug: noop,
|
32 | trace: noop
|
33 | }
|
34 | }
|
35 | yield task(context)
|
36 | }))
|
37 | })
|
38 |
|
39 |
|