diff --git a/README.markdown b/README.markdown index b04cc19dd..7364ef234 100644 --- a/README.markdown +++ b/README.markdown @@ -1,5 +1,4 @@ -# Javascript Koans - koans to learn Javascript (the good bits) # - +# javascript-koans Based on Edgecase's fantastic [Ruby koans](http://github.com/edgecase/ruby_koans), the goal of the Javascript koans is to teach you Javascript programming through @@ -15,8 +14,7 @@ koans will be very simple, so don't overthink them! As you progress through more koans, more and more Javascript syntax will be introduced which will allow you to solve more complicated problems and use more advanced techniques. -### Running the Koans from a Browser - +## Running the Koans Simply navigate to the Javascript Koans folder using a file browser, and double click on KoansRunnner.html. @@ -27,23 +25,16 @@ browsers. The first error will be in koans/AboutExpects.js. Fix the first test and refresh the browser. Rinse and repeat until all tests turn green. -The test runner used is [Jasmine](http://pivotal.github.com/jasmine/) with a -customized report viewer. +The test runner used is [Jasmine](http://jasmine.github.io/) with a customized report viewer. ### Changelog - * v3 - Nov 2010 - Moved out of branch of functional-koans project, into own top level project * v2 - Sept 2010 - Second version based on jasmine (Thanks Greg Malcolm!) * v1 - July 2010 - First version based on jsTestDriver -### Inspirations & thanks - +### Acknowledgements * Dick Wall (the Java posse) - for bringing the idea of koans to my attention * Edgecase - for the great Ruby Koans * Douglas Crockford - for Javascript; the good bits -##### License - -This software is (c) 2010 David Laing & Greg Malcolm, and licensed under the MIT license (see -LICENCE for details). Enjoy! - +### [MIT Licensed](LICENSE) diff --git a/koans/AboutExpects.js b/koans/AboutExpects.js index a7ced620a..7d1a827cb 100644 --- a/koans/AboutExpects.js +++ b/koans/AboutExpects.js @@ -1,12 +1,14 @@ -describe("About Expects", function() { +describe('About Expects', function() { // We shall contemplate truth by testing reality, via spec expectations. - it("should expect true", function() { - expect(false).toBeTruthy(); //This should be true + it('should expect true', function() { + + // Your journey begins here: Replace the word false with true + expect(false).toBeTruthy(); }); // To understand reality, we must compare our expectations against reality. - it("should expect equality", function () { + it('should expect equality', function() { var expectedValue = FILL_ME_IN; var actualValue = 1 + 1; @@ -14,7 +16,7 @@ describe("About Expects", function() { }); // Some ways of asserting equality are better than others. - it("should assert equality a better way", function () { + it('should assert equality a better way', function() { var expectedValue = FILL_ME_IN; var actualValue = 1 + 1; @@ -22,8 +24,8 @@ describe("About Expects", function() { expect(actualValue).toEqual(expectedValue); }); - // Sometimes you need to be really exact about what you "type." - it("should assert equality with ===", function () { + // Sometimes you need to be precise about what you "type." + it('should assert equality with ===', function() { var expectedValue = FILL_ME_IN; var actualValue = (1 + 1).toString(); @@ -32,7 +34,7 @@ describe("About Expects", function() { }); // Sometimes we will ask you to fill in the values. - it("should have filled in values", function () { + it('should have filled in values', function() { expect(1 + 1).toEqual(FILL_ME_IN); }); });