Skip to content

Commit c3c426c

Browse files
author
Fred Zirdung
committed
Initial commit
0 parents  commit c3c426c

File tree

11 files changed

+12046
-0
lines changed

11 files changed

+12046
-0
lines changed

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
###OSX###
2+
3+
.DS_Store
4+
.AppleDouble
5+
.LSOverride
6+
Icon
7+
8+
# Thumbnails
9+
._*
10+
# Files that might appear on external disk
11+
.Spotlight-V100
12+
.Trashes
13+
14+
###Node###
15+
16+
lib-cov
17+
*.seed
18+
*.log
19+
*.csv
20+
*.dat
21+
*.out
22+
*.pid
23+
*.gz
24+
25+
pids
26+
logs
27+
results
28+
29+
npm-debug.log
30+
node_modules

SpecRunner.html

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Underscore Test Suite [Mocha]</title>
5+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6+
<link rel="stylesheet" href="lib/css/mocha.css" />
7+
<script src="lib/jquery.js"></script>
8+
<script src="lib/picomodal.js"></script>
9+
<script src="lib/tweetit.js"></script>
10+
<script src="lib/expect.js"></script>
11+
<script src="lib/mocha.js"></script>
12+
<script src="lib/sinon.js"></script>
13+
14+
<script>
15+
// Tell mocha to use bdd-style expects
16+
mocha.setup('bdd');
17+
</script>
18+
19+
<!-- Load tests and helpers here -->
20+
<script src="src/underbar.js"></script>
21+
<script src="spec/underbarSpec.js"></script>
22+
23+
<script>
24+
// Mocha expects a global onload var here and automagically executes it on pageload
25+
onload = function(){
26+
var runner = window.mochaPhantomJS ? mochaPhantomJS.run() : mocha.run();
27+
runner.on('end', function() {
28+
if(!this.failures){
29+
window.tweetit();
30+
}
31+
});
32+
};
33+
</script>
34+
</head>
35+
<body>
36+
<div id="mocha"></div>
37+
</body>
38+
</html>

lib/css/mocha.css

Lines changed: 241 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,241 @@
1+
@charset "utf-8";
2+
3+
body {
4+
font: 20px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
5+
padding: 60px 50px;
6+
}
7+
8+
#mocha ul, #mocha li {
9+
margin: 0;
10+
padding: 0;
11+
}
12+
13+
#mocha ul {
14+
list-style: none;
15+
}
16+
17+
#mocha h1, #mocha h2 {
18+
margin: 0;
19+
}
20+
21+
#mocha h1 {
22+
margin-top: 15px;
23+
font-size: 1em;
24+
font-weight: 200;
25+
}
26+
27+
#mocha h1 a {
28+
text-decoration: none;
29+
color: inherit;
30+
}
31+
32+
#mocha h1 a:hover {
33+
text-decoration: underline;
34+
}
35+
36+
#mocha .suite .suite h1 {
37+
margin-top: 0;
38+
font-size: .8em;
39+
}
40+
41+
.hidden {
42+
display: none;
43+
}
44+
45+
#mocha h2 {
46+
font-size: 12px;
47+
font-weight: normal;
48+
cursor: pointer;
49+
}
50+
51+
#mocha .suite {
52+
margin-left: 15px;
53+
}
54+
55+
#mocha .test {
56+
margin-left: 15px;
57+
overflow: hidden;
58+
}
59+
60+
#mocha .test.pending:hover h2::after {
61+
content: '(pending)';
62+
font-family: arial;
63+
}
64+
65+
#mocha .test.pass.medium .duration {
66+
background: #C09853;
67+
}
68+
69+
#mocha .test.pass.slow .duration {
70+
background: #B94A48;
71+
}
72+
73+
#mocha .test.pass::before {
74+
content: '✓';
75+
font-size: 12px;
76+
display: block;
77+
float: left;
78+
margin-right: 5px;
79+
color: #00d6b2;
80+
}
81+
82+
#mocha .test.pass .duration {
83+
font-size: 9px;
84+
margin-left: 5px;
85+
padding: 2px 5px;
86+
color: white;
87+
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
88+
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
89+
box-shadow: inset 0 1px 1px rgba(0,0,0,.2);
90+
-webkit-border-radius: 5px;
91+
-moz-border-radius: 5px;
92+
-ms-border-radius: 5px;
93+
-o-border-radius: 5px;
94+
border-radius: 5px;
95+
}
96+
97+
#mocha .test.pass.fast .duration {
98+
display: none;
99+
}
100+
101+
#mocha .test.pending {
102+
color: #0b97c4;
103+
}
104+
105+
#mocha .test.pending::before {
106+
content: '◦';
107+
color: #0b97c4;
108+
}
109+
110+
#mocha .test.fail {
111+
color: #c00;
112+
}
113+
114+
#mocha .test.fail pre {
115+
color: black;
116+
}
117+
118+
#mocha .test.fail::before {
119+
content: '✖';
120+
font-size: 12px;
121+
display: block;
122+
float: left;
123+
margin-right: 5px;
124+
color: #c00;
125+
}
126+
127+
#mocha .test pre.error {
128+
color: #c00;
129+
max-height: 300px;
130+
overflow: auto;
131+
}
132+
133+
#mocha .test pre {
134+
display: block;
135+
float: left;
136+
clear: left;
137+
font: 12px/1.5 monaco, monospace;
138+
margin: 5px;
139+
padding: 15px;
140+
border: 1px solid #eee;
141+
border-bottom-color: #ddd;
142+
-webkit-border-radius: 3px;
143+
-webkit-box-shadow: 0 1px 3px #eee;
144+
-moz-border-radius: 3px;
145+
-moz-box-shadow: 0 1px 3px #eee;
146+
}
147+
148+
#mocha .test h2 {
149+
position: relative;
150+
}
151+
152+
#mocha .test a.replay {
153+
position: absolute;
154+
top: 3px;
155+
right: 0;
156+
text-decoration: none;
157+
vertical-align: middle;
158+
display: block;
159+
width: 15px;
160+
height: 15px;
161+
line-height: 15px;
162+
text-align: center;
163+
background: #eee;
164+
font-size: 15px;
165+
-moz-border-radius: 15px;
166+
border-radius: 15px;
167+
-webkit-transition: opacity 200ms;
168+
-moz-transition: opacity 200ms;
169+
transition: opacity 200ms;
170+
opacity: 0.3;
171+
color: #888;
172+
}
173+
174+
#mocha .test:hover a.replay {
175+
opacity: 1;
176+
}
177+
178+
#mocha-report.pass .test.fail {
179+
display: none;
180+
}
181+
182+
#mocha-report.fail .test.pass {
183+
display: none;
184+
}
185+
186+
#mocha-error {
187+
color: #c00;
188+
font-size: 1.5 em;
189+
font-weight: 100;
190+
letter-spacing: 1px;
191+
}
192+
193+
#mocha-stats {
194+
position: fixed;
195+
top: 15px;
196+
right: 10px;
197+
font-size: 12px;
198+
margin: 0;
199+
color: #888;
200+
}
201+
202+
#mocha-stats .progress {
203+
float: right;
204+
padding-top: 0;
205+
}
206+
207+
#mocha-stats em {
208+
color: black;
209+
}
210+
211+
#mocha-stats a {
212+
text-decoration: none;
213+
color: inherit;
214+
}
215+
216+
#mocha-stats a:hover {
217+
border-bottom: 1px solid #eee;
218+
}
219+
220+
#mocha-stats li {
221+
display: inline-block;
222+
margin: 0 5px;
223+
list-style: none;
224+
padding-top: 11px;
225+
}
226+
227+
code .comment { color: #ddd }
228+
code .init { color: #2F6FAD }
229+
code .string { color: #5890AD }
230+
code .keyword { color: #8A6343 }
231+
code .number { color: #2F6FAD }
232+
233+
@media screen and (max-device-width: 480px) {
234+
body {
235+
padding: 60px 0px;
236+
}
237+
238+
#stats {
239+
position: absolute;
240+
}
241+
}

0 commit comments

Comments
 (0)