1 |
|
2 |
|
3 |
|
4 |
|
5 | 'use strict'
|
6 |
|
7 |
|
8 |
|
9 | const mochaTestJsBud = require('../lib/mocha_test_js_bud.js')
|
10 | const assert = require('assert')
|
11 | const path = require('path')
|
12 |
|
13 | const coz = require('coz')
|
14 | const mkdirp = require('mkdirp')
|
15 |
|
16 | describe('mocha-test-js-bud', () => {
|
17 | let basedir = path.resolve(__dirname, '..')
|
18 | let tmpDir = path.resolve(basedir, 'tmp/mocha_bud_test/pkg-foo')
|
19 |
|
20 | before(async () => {
|
21 | mkdirp.sync(tmpDir)
|
22 | })
|
23 |
|
24 | after(async () => {
|
25 | })
|
26 |
|
27 | it('Mocha test js bud', async () => {
|
28 | let bud = mochaTestJsBud({
|
29 | src: [
|
30 | path.join(__dirname, '/*.js')
|
31 | ],
|
32 | dest: tmpDir
|
33 | })
|
34 | assert.ok(bud)
|
35 | await coz.render(bud, {
|
36 | cwd: tmpDir
|
37 | })
|
38 | })
|
39 | })
|
40 |
|