Skip to content

Commit 42f74eb

Browse files
committed
Fin tests
1 parent ce346ba commit 42f74eb

File tree

12 files changed

+469
-15
lines changed

12 files changed

+469
-15
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ node_modules/
33
.vagrant
44
npm-debug.*
55
*.sublime-*
6-
test/unit/coverage/

dist/build.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/build.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

memo.txt

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
=============
12
=== NPM Permissions : https://docs.npmjs.com/getting-started/fixing-npm-permissions ===
3+
=============
24

3-
1.
5+
1. (remove /public on DocumentRoot)
46
sudo nano /etc/apache2/sites-available/000-default.conf
5-
(remove /public on DocumentRoot)
67

78

89
2.
@@ -21,7 +22,7 @@ mkdir ~/.npm-global/lib && mkdir ~/.npm-global/lib/node_modules && mkdir ~/.npm-
2122
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
2223

2324

24-
6.
25+
6. (in /var/www/)
2526
sudo npm install --no-bin-links
2627

2728

@@ -33,15 +34,16 @@ sudo npm install cross-env webpack webpack-dev-server --save
3334
npm run dev
3435

3536

36-
37+
=============
3738
=== KARMA ===
39+
=============
3840

3941
1.
40-
npm i -g karma-cli --save
42+
npm i -g karma-cli phantomjs-prebuilt --save
4143

42-
2.
43-
export PHANTOMJS_BIN=/home/vagrant/.npm-global/bin/phantomjs
4444

45+
2.
46+
export PHANTOMJS_BIN=/home/vagrant/.npm-global/lib/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs
4547

4648

4749
3.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@
1313
"cross-env": "^3.2.4",
1414
"karma-cli": "^1.0.1",
1515
"lodash": "^4.17.4",
16-
"phantomjs": "^2.1.7",
1716
"vue": "^2.2",
1817
"webpack": "^2.3.1",
1918
"webpack-dev-server": "^2.4.2"
2019
},
2120
"devDependencies": {
2221
"autoprefixer": "^6.7.6",
2322
"axios": "^0.15.3",
24-
"babel-core": "^6.0.0",
23+
"babel-core": "^6.24.0",
2524
"babel-loader": "^6.0.0",
2625
"babel-polyfill": "^6.23.0",
2726
"babel-preset-es2015": "^6.0.0",
@@ -42,6 +41,7 @@
4241
"less": "^2.7.2",
4342
"less-loader": "^2.2.3",
4443
"moment": "^2.17.1",
44+
"phantomjs-prebuilt": "^2.1.14",
4545
"postcss-loader": "^1.3.3",
4646
"style-loader": "^0.13.1",
4747
"vue-axios": "^1.2.2",
Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
body, html {
2+
margin:0; padding: 0;
3+
height: 100%;
4+
}
5+
body {
6+
font-family: Helvetica Neue, Helvetica, Arial;
7+
font-size: 14px;
8+
color:#333;
9+
}
10+
.small { font-size: 12px; }
11+
*, *:after, *:before {
12+
-webkit-box-sizing:border-box;
13+
-moz-box-sizing:border-box;
14+
box-sizing:border-box;
15+
}
16+
h1 { font-size: 20px; margin: 0;}
17+
h2 { font-size: 14px; }
18+
pre {
19+
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
20+
margin: 0;
21+
padding: 0;
22+
-moz-tab-size: 2;
23+
-o-tab-size: 2;
24+
tab-size: 2;
25+
}
26+
a { color:#0074D9; text-decoration:none; }
27+
a:hover { text-decoration:underline; }
28+
.strong { font-weight: bold; }
29+
.space-top1 { padding: 10px 0 0 0; }
30+
.pad2y { padding: 20px 0; }
31+
.pad1y { padding: 10px 0; }
32+
.pad2x { padding: 0 20px; }
33+
.pad2 { padding: 20px; }
34+
.pad1 { padding: 10px; }
35+
.space-left2 { padding-left:55px; }
36+
.space-right2 { padding-right:20px; }
37+
.center { text-align:center; }
38+
.clearfix { display:block; }
39+
.clearfix:after {
40+
content:'';
41+
display:block;
42+
height:0;
43+
clear:both;
44+
visibility:hidden;
45+
}
46+
.fl { float: left; }
47+
@media only screen and (max-width:640px) {
48+
.col3 { width:100%; max-width:100%; }
49+
.hide-mobile { display:none!important; }
50+
}
51+
52+
.quiet {
53+
color: #7f7f7f;
54+
color: rgba(0,0,0,0.5);
55+
}
56+
.quiet a { opacity: 0.7; }
57+
58+
.fraction {
59+
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
60+
font-size: 10px;
61+
color: #555;
62+
background: #E8E8E8;
63+
padding: 4px 5px;
64+
border-radius: 3px;
65+
vertical-align: middle;
66+
}
67+
68+
div.path a:link, div.path a:visited { color: #333; }
69+
table.coverage {
70+
border-collapse: collapse;
71+
margin: 10px 0 0 0;
72+
padding: 0;
73+
}
74+
75+
table.coverage td {
76+
margin: 0;
77+
padding: 0;
78+
vertical-align: top;
79+
}
80+
table.coverage td.line-count {
81+
text-align: right;
82+
padding: 0 5px 0 20px;
83+
}
84+
table.coverage td.line-coverage {
85+
text-align: right;
86+
padding-right: 10px;
87+
min-width:20px;
88+
}
89+
90+
table.coverage td span.cline-any {
91+
display: inline-block;
92+
padding: 0 5px;
93+
width: 100%;
94+
}
95+
.missing-if-branch {
96+
display: inline-block;
97+
margin-right: 5px;
98+
border-radius: 3px;
99+
position: relative;
100+
padding: 0 4px;
101+
background: #333;
102+
color: yellow;
103+
}
104+
105+
.skip-if-branch {
106+
display: none;
107+
margin-right: 10px;
108+
position: relative;
109+
padding: 0 4px;
110+
background: #ccc;
111+
color: white;
112+
}
113+
.missing-if-branch .typ, .skip-if-branch .typ {
114+
color: inherit !important;
115+
}
116+
.coverage-summary {
117+
border-collapse: collapse;
118+
width: 100%;
119+
}
120+
.coverage-summary tr { border-bottom: 1px solid #bbb; }
121+
.keyline-all { border: 1px solid #ddd; }
122+
.coverage-summary td, .coverage-summary th { padding: 10px; }
123+
.coverage-summary tbody { border: 1px solid #bbb; }
124+
.coverage-summary td { border-right: 1px solid #bbb; }
125+
.coverage-summary td:last-child { border-right: none; }
126+
.coverage-summary th {
127+
text-align: left;
128+
font-weight: normal;
129+
white-space: nowrap;
130+
}
131+
.coverage-summary th.file { border-right: none !important; }
132+
.coverage-summary th.pct { }
133+
.coverage-summary th.pic,
134+
.coverage-summary th.abs,
135+
.coverage-summary td.pct,
136+
.coverage-summary td.abs { text-align: right; }
137+
.coverage-summary td.file { white-space: nowrap; }
138+
.coverage-summary td.pic { min-width: 120px !important; }
139+
.coverage-summary tfoot td { }
140+
141+
.coverage-summary .sorter {
142+
height: 10px;
143+
width: 7px;
144+
display: inline-block;
145+
margin-left: 0.5em;
146+
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
147+
}
148+
.coverage-summary .sorted .sorter {
149+
background-position: 0 -20px;
150+
}
151+
.coverage-summary .sorted-desc .sorter {
152+
background-position: 0 -10px;
153+
}
154+
.status-line { height: 10px; }
155+
/* dark red */
156+
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
157+
.low .chart { border:1px solid #C21F39 }
158+
/* medium red */
159+
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
160+
/* light red */
161+
.low, .cline-no { background:#FCE1E5 }
162+
/* light green */
163+
.high, .cline-yes { background:rgb(230,245,208) }
164+
/* medium green */
165+
.cstat-yes { background:rgb(161,215,106) }
166+
/* dark green */
167+
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
168+
.high .chart { border:1px solid rgb(77,146,33) }
169+
/* dark yellow (gold) */
170+
.medium .chart { border:1px solid #f9cd0b; }
171+
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
172+
/* light yellow */
173+
.medium { background: #fff4c2; }
174+
/* light gray */
175+
span.cline-neutral { background: #eaeaea; }
176+
177+
.cbranch-no { background: yellow !important; color: #111; }
178+
179+
.cstat-skip { background: #ddd; color: #111; }
180+
.fstat-skip { background: #ddd; color: #111 !important; }
181+
.cbranch-skip { background: #ddd !important; color: #111; }
182+
183+
184+
.cover-fill, .cover-empty {
185+
display:inline-block;
186+
height: 12px;
187+
}
188+
.chart {
189+
line-height: 0;
190+
}
191+
.cover-empty {
192+
background: white;
193+
}
194+
.cover-full {
195+
border-right: none !important;
196+
}
197+
pre.prettyprint {
198+
border: none !important;
199+
padding: 0 !important;
200+
margin: 0 !important;
201+
}
202+
.com { color: #999 !important; }
203+
.ignore-none { color: #999; font-weight: normal; }
204+
205+
.wrapper {
206+
min-height: 100%;
207+
height: auto !important;
208+
height: 100%;
209+
margin: 0 auto -48px;
210+
}
211+
.footer, .push {
212+
height: 48px;
213+
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<title>Code coverage report for All files</title>
5+
<meta charset="utf-8" />
6+
<link rel="stylesheet" href="prettify.css" />
7+
<link rel="stylesheet" href="base.css" />
8+
<meta name="viewport" content="width=device-width, initial-scale=1">
9+
<style type='text/css'>
10+
.coverage-summary .sorter {
11+
background-image: url(sort-arrow-sprite.png);
12+
}
13+
</style>
14+
</head>
15+
<body>
16+
<div class='wrapper'>
17+
<div class='pad1'>
18+
<h1>
19+
/
20+
</h1>
21+
<div class='clearfix'>
22+
<div class='fl pad1y space-right2'>
23+
<span class="strong">100% </span>
24+
<span class="quiet">Statements</span>
25+
<span class='fraction'>0/0</span>
26+
</div>
27+
<div class='fl pad1y space-right2'>
28+
<span class="strong">100% </span>
29+
<span class="quiet">Branches</span>
30+
<span class='fraction'>0/0</span>
31+
</div>
32+
<div class='fl pad1y space-right2'>
33+
<span class="strong">100% </span>
34+
<span class="quiet">Functions</span>
35+
<span class='fraction'>0/0</span>
36+
</div>
37+
<div class='fl pad1y space-right2'>
38+
<span class="strong">100% </span>
39+
<span class="quiet">Lines</span>
40+
<span class='fraction'>0/0</span>
41+
</div>
42+
</div>
43+
</div>
44+
<div class='status-line high'></div>
45+
<div class="pad1">
46+
<table class="coverage-summary">
47+
<thead>
48+
<tr>
49+
<th data-col="file" data-fmt="html" data-html="true" class="file">File</th>
50+
<th data-col="pic" data-type="number" data-fmt="html" data-html="true" class="pic"></th>
51+
<th data-col="statements" data-type="number" data-fmt="pct" class="pct">Statements</th>
52+
<th data-col="statements_raw" data-type="number" data-fmt="html" class="abs"></th>
53+
<th data-col="branches" data-type="number" data-fmt="pct" class="pct">Branches</th>
54+
<th data-col="branches_raw" data-type="number" data-fmt="html" class="abs"></th>
55+
<th data-col="functions" data-type="number" data-fmt="pct" class="pct">Functions</th>
56+
<th data-col="functions_raw" data-type="number" data-fmt="html" class="abs"></th>
57+
<th data-col="lines" data-type="number" data-fmt="pct" class="pct">Lines</th>
58+
<th data-col="lines_raw" data-type="number" data-fmt="html" class="abs"></th>
59+
</tr>
60+
</thead>
61+
<tbody></tbody>
62+
</table>
63+
</div><div class='push'></div><!-- for sticky footer -->
64+
</div><!-- /wrapper -->
65+
<div class='footer quiet pad2 space-top1 center small'>
66+
Code coverage
67+
generated by <a href="http://istanbul-js.org/" target="_blank">istanbul</a> at Fri Mar 24 2017 11:27:49 GMT+0000 (UTC)
68+
</div>
69+
</div>
70+
<script src="prettify.js"></script>
71+
<script>
72+
window.onload = function () {
73+
if (typeof prettyPrint === 'function') {
74+
prettyPrint();
75+
}
76+
};
77+
</script>
78+
<script src="sorter.js"></script>
79+
</body>
80+
</html>

test/unit/coverage/lcov-report/prettify.css

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/unit/coverage/lcov-report/prettify.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Loading

0 commit comments

Comments
 (0)