forked from excellenteasy/ios-icon-resize
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
executable file
·31 lines (30 loc) · 1.44 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
'use strict'
var test = require('tape')
var resize = require('./')
var fs = require('fs')
var rimraf = require('rimraf')
var mkdirp = require('mkdirp')
test('creates all icons in tmp directory', function (t) {
t.plan(15)
rimraf('tmp', function () {
mkdirp('tmp', function () {
resize('test/com.appbusinesspodcast.www.png', 'tmp/').then(function () {
t.ok(fs.existsSync('tmp/[email protected]'), '[email protected] created')
t.ok(fs.existsSync('tmp/icon-60.png'), 'icon-60.png created')
t.ok(fs.existsSync('tmp/[email protected]'), '[email protected] created')
t.ok(fs.existsSync('tmp/icon-76.png'), 'icon-76.png created')
t.ok(fs.existsSync('tmp/[email protected]'), '[email protected] created')
t.ok(fs.existsSync('tmp/icon-40.png'), 'icon-40.png created')
t.ok(fs.existsSync('tmp/[email protected]'), '[email protected] created')
t.ok(fs.existsSync('tmp/icon.png'), 'icon.png created')
t.ok(fs.existsSync('tmp/[email protected]'), '[email protected] created')
t.ok(fs.existsSync('tmp/icon-72.png'), 'icon-72.png created')
t.ok(fs.existsSync('tmp/[email protected]'), '[email protected] created')
t.ok(fs.existsSync('tmp/icon-small.png'), 'icon-small.png')
t.ok(fs.existsSync('tmp/[email protected]'), '[email protected]')
t.ok(fs.existsSync('tmp/icon-50.png'), 'icon-50.png created')
t.ok(fs.existsSync('tmp/[email protected]'), '[email protected] created')
})
})
})
})