1 |
|
2 |
|
3 |
|
4 |
|
5 | 'use strict'
|
6 |
|
7 | const assert = require('assert')
|
8 |
|
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(async () => {
|
20 | mkdirp.sync(tmpDir)
|
21 | })
|
22 |
|
23 | after(async () => {
|
24 | })
|
25 |
|
26 | it('Generate favicon', async () => {
|
27 | let filename = tmpDir + '/testing-bin-favicon.png'
|
28 | await execcli(furBin, [ 'favicon', filename ])
|
29 | assert.ok(fs.existsSync(filename))
|
30 | })
|
31 |
|
32 | it('Generate banner', async () => {
|
33 | let filename = tmpDir + '/testing-bin-banner.png'
|
34 | await execcli(furBin, [ 'banner', filename ])
|
35 | assert.ok(fs.existsSync(filename))
|
36 | })
|
37 | })
|
38 |
|
39 |
|
\ | No newline at end of file |