UNPKG

693 BJavaScriptView Raw
1/**
2 * Test case for define.
3 * Runs with mocha.
4 */
5'use strict'
6
7const define = require('../lib/define.js')
8const co = require('co')
9const assert = require('assert')
10const mkdirp = require('mkdirp')
11
12const tmpDir = `${__dirname}/../`
13const noop = () => undefined
14
15describe('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/* global describe, it, before, after */