1 |
|
2 |
|
3 |
|
4 |
|
5 | 'use strict'
|
6 |
|
7 | const assert = require('assert')
|
8 | const co = require('co')
|
9 |
|
10 | const fs = require('fs')
|
11 | const furBin = require.resolve('../bin/fur')
|
12 | const execcli = require('execcli')
|
13 | const mkdirp = require('mkdirp')
|
14 |
|
15 | let tmpDir = __dirname + '/../tmp'
|
16 |
|
17 | describe('bin', function () {
|
18 | this.timeout(24000)
|
19 | before(() => co(function * () {
|
20 | mkdirp.sync(tmpDir)
|
21 | }))
|
22 |
|
23 | after(() => co(function * () {
|
24 | }))
|
25 |
|
26 | it('Generate favicon', () => co(function * () {
|
27 | let filename = tmpDir + '/testing-bin-favicon.png'
|
28 | yield execcli(furBin, [ 'favicon', filename ])
|
29 | assert.ok(fs.existsSync(filename))
|
30 | }))
|
31 |
|
32 | it('Generate banner', () => co(function * () {
|
33 | let filename = tmpDir + '/testing-bin-banner.png'
|
34 | yield execcli(furBin, [ 'banner', filename ])
|
35 | assert.ok(fs.existsSync(filename))
|
36 | }))
|
37 | })
|
38 |
|
39 |
|
\ | No newline at end of file |