UNPKG

774 BJavaScriptView Raw
1/**
2 * Test case for mochaTestJsBud.
3 * Runs with mocha.
4 */
5'use strict'
6
7/* global describe, before, after, it */
8
9const mochaTestJsBud = require('../lib/mocha_test_js_bud.js')
10const assert = require('assert')
11const path = require('path')
12
13const coz = require('coz')
14const mkdirp = require('mkdirp')
15
16describe('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