Skip to content

Commit 353f1f0

Browse files
committed
1 parent f4bf1d5 commit 353f1f0

40 files changed

+5413
-0
lines changed

KoansRunner.html

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2+
"http://www.w3.org/TR/html4/loose.dtd">
3+
<html>
4+
<head>
5+
<title>Javascript Koans</title>
6+
<link rel="stylesheet" type="text/css" href="lib/jasmine/jskoans-jasmine.css">
7+
<script type="text/javascript" src="lib/jasmine/jasmine.js"></script>
8+
<script type="text/javascript" src="lib/jasmine/jasmine-html.js"></script>
9+
<script type="text/javascript" src="lib/jasmine/jskoans-jasmine-html.js"></script>
10+
11+
<script type="text/javascript" src="lib/dojo-release-1.5.0/dojo/dojo.js"></script>
12+
<script type="text/javascript" src="lib/dojo-release-1.5.0/dojox/lang/functional/lambda.js"></script>
13+
<script type="text/javascript" src="lib/dojo-release-1.5.0/dojox/lang/functional/array.js"></script>
14+
<script type="text/javascript" src="lib/dojo-release-1.5.0/dojox/lang/functional/fold.js"></script>
15+
<script type="text/javascript" src="lib/dojo-release-1.5.0/dojox/lang/functional/sequence.js"></script>
16+
<script type="text/javascript" src="lib/__.js"></script>
17+
18+
<script type="text/javascript" src="koans/AboutExpects.js"></script>
19+
<script type="text/javascript" src="koans/AboutArrays.js"></script>
20+
<script type="text/javascript" src="koans/AboutFunctions.js"></script>
21+
<script type="text/javascript" src="koans/AboutObjects.js"></script>
22+
<script type="text/javascript" src="koans/AboutMutability.js"></script>
23+
<script type="text/javascript" src="koans/AboutLambda.js"></script>
24+
<script type="text/javascript" src="koans/AboutHigherOrderFunctions.js"></script>
25+
<script type="text/javascript" src="koans/aboutApplyingWhatWeHaveLearnt.js"></script>
26+
</head>
27+
<body>
28+
29+
<script type="text/javascript">
30+
jasmine.getEnv().addReporter(new JsKoansReporter());
31+
jasmine.getEnv().execute();
32+
</script>
33+
34+
</body>
35+
</html>

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
Copyright (c) 2010 David Laing
2+
3+
Permission is hereby granted, free of charge, to any person
4+
obtaining a copy of this software and associated documentation
5+
files (the "Software"), to deal in the Software without
6+
restriction, including without limitation the rights to use,
7+
copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
copies of the Software, and to permit persons to whom the
9+
Software is furnished to do so, subject to the following
10+
conditions:
11+
12+
The above copyright notice and this permission notice shall be
13+
included in all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22+
OTHER DEALINGS IN THE SOFTWARE.

README.markdown

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Functional Koans - Functional Javascript #
2+
3+
Based on Edgecase's fantastic
4+
[Ruby koans](http://github.com/edgecase/ruby_koans), the goal of the
5+
Functional Javascript koans is to teach you Functional Javascript through
6+
testing.
7+
8+
When you first run the koans, you'll be presented with a runtime error and a
9+
stack trace indicating where the error occurred. Your goal is to make the
10+
error go away. As you fix each error, you should learn something about the
11+
Javascript language and functional programming in general.
12+
13+
Your journey towards Javascript enlightenment starts in the koans/AboutExpects.js file. These
14+
koans will be very simple, so don't overthink them! As you progress through
15+
more koans, more and more Javascript syntax will be introduced which will allow
16+
you to solve more complicated problems and use more advanced techniques.
17+
18+
### Running the Koans from a Browser
19+
20+
Simply navigate to the Javascript Koans folder using a file browser, and
21+
double click on KoansRunnner.html.
22+
23+
Any browser will do, but for the best results Firefox or Chrome is
24+
recommended. More stack trace information shows up for javascript on this
25+
browsers.
26+
27+
The first error will be in koans/AboutExpects.js. Fix the first test and
28+
refresh the browser. Rinse and repeat until all tests turn green.
29+
30+
The test runner used is [Jasmine](http://pivotal.github.com/jasmine/) with a
31+
customized reports viewer.
32+
33+
### Changelog
34+
35+
v2 - Sept 2010 - Second version based on jasmine (Thanks Greg Malcolm!)
36+
v1 - July 2010 - First version based on jsTestDriver
37+
38+
##### License
39+
40+
This software is (c) 2010 David Laing, and licensed under the MIT license (see
41+
LICENCE for details). Enjoy!
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2+
"http://www.w3.org/TR/html4/loose.dtd">
3+
<html>
4+
<head>
5+
<title>Jasmine Test Runner</title>
6+
<link rel="stylesheet" type="text/css" href="../../jasmine/jasmine.css">
7+
<script type="text/javascript" src="../jasmine.js"></script>
8+
<script type="text/javascript" src="../jasmine-html.js"></script>
9+
10+
<!-- include source files here... -->
11+
<script type="text/javascript" src="../jskoans-jasmine-html.js"></script>
12+
13+
<!-- include spec files here... -->
14+
<script type="text/javascript" src="suites/KoansRunnerSpec.js"></script>
15+
16+
</head>
17+
<body>
18+
<script type="text/javascript">
19+
jasmine.getEnv().addReporter(new jasmine.TrivialReporter());
20+
jasmine.getEnv().execute();
21+
</script>
22+
23+
</body>
24+
</html>

0 commit comments

Comments
 (0)