-
Notifications
You must be signed in to change notification settings - Fork 21
/
index.js
59 lines (46 loc) · 2.03 KB
/
index.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import test from 'ava';
import fs from 'fs';
const svg = fs.readdirSync("./build/svg/");
const data = JSON.parse(fs.readFileSync("./build/data.json"))
test('svg are loaded', t => {
t.truthy(svg, "Didn't find any feathericon.");
t.not(Object.keys(svg).length, 0, "Didn't find any feathericon.")
});
test('Every svg is in ./build/data.json', t => {
svg.forEach( point => {
point = point.replace('.svg', '')
t.truthy(data[point], './build/data.json doesn\'t include the feathericon "' + point + '"')
})
})
test('No deprecated svg are in ./build/data.json', t => {
Object.keys(data).forEach( point => {
t.truthy(svg.indexOf(point+'.svg') >= 0, './build/data.json contains the deleted feathericon `' + point + '`, please remove it.' );
})
})
test('svg-sprite is in ./build/svg-sprite', t => {
t.truthy(fs.existsSync("./build/svg-sprite/sprite.feathericon.svg"), "sprite.feathericon.svg does not exist!");
});
test('css is in ./build/css', t => {
t.truthy(fs.existsSync("./build/css/feathericon.css"), "feathericon.css does not exist!");
});
test('Minified css is in ./build/css', t => {
t.truthy(fs.existsSync("./build/css/feathericon.min.css"), "feathericon.min.css does not exist!");
});
test('scss is in ./build/scss', t => {
t.truthy(fs.existsSync("./build/scss/_feathericon.scss"), "_feathericon.scss does not exist!");
});
test('eot is in ./build/fonts', t => {
t.truthy(fs.existsSync("./build/fonts/feathericon.eot"), "feathericon.eot does not exsist!");
});
test('svg font is in ./build/fonts', t => {
t.truthy(fs.existsSync("./build/fonts/feathericon.svg"), "feathericon.svg does not exsist!");
});
test('ttf is in ./build/fonts', t => {
t.truthy(fs.existsSync("./build/fonts/feathericon.ttf"), "feathericon.ttf does not exsist!");
});
test('woff is in ./build/fonts', t => {
t.truthy(fs.existsSync("./build/fonts/feathericon.woff"), "feathericon.woff does not exsist!");
});
test('woff2 is in ./build/fonts', t => {
t.truthy(fs.existsSync("./build/fonts/feathericon.woff2"), "feathericon.woff2 does not exsist!");
});