UNPKG

826 BJavaScriptView Raw
1/**
2 * Test for fur bin.
3 * Runs with mocha.
4 */
5'use strict'
6
7const assert = require('assert')
8
9
10const fs = require('fs')
11const furBin = require.resolve('../bin/fur')
12const execcli = require('execcli')
13const mkdirp = require('mkdirp')
14
15let tmpDir = __dirname + '/../tmp'
16
17describe('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/* global describe, before, after, it */
\No newline at end of file