Skip to content

Commit d0bf1e2

Browse files
committed
Changed wording and problem in asserts koan
1 parent e0e43eb commit d0bf1e2

9 files changed

+17
-16
lines changed

koans/AboutApplyingWhatWeHaveLearnt.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,12 @@ describe("About Applying What We Have Learnt", function() {
111111
112112
});
113113
114-
it("should what is the smallest number divisible by each of the numbers 1 to 20", function () {
114+
it("should find the smallest number divisible by each of the numbers 1 to 20", function () {
115115
116116
117117
});
118118
119-
it("should what is the difference between the sum of the squares and the square of the sums", function () {
119+
it("should find the difference between the sum of the squares and the square of the sums", function () {
120120
121121
});
122122

koans/AboutArrays.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe("About Arrays", function() {
8484
expect(array).toEqual(__);
8585
});
8686

87-
it("should shifting arrays", function () {
87+
it("should know about shifting arrays", function () {
8888
var array = [1, 2];
8989

9090
array.unshift(3);

koans/AboutExpects.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@ describe("About Expects", function() {
1818
var expectedValue = __;
1919
var actualValue = 1 + 1;
2020

21-
// toEqual() compares using common sense equality
21+
// toEqual() compares using common sense equality.
2222
expect(actualValue).toEqual(expectedValue);
2323
});
2424

25-
//Sometime you need to be really exact
25+
//Sometimes you need to be really exact about what you "type".
2626
it("should assert equality with ===", function () {
2727
var expectedValue = __;
28-
var actualValue = 1 + 1;
28+
var actualValue = (1 + 1).toString();
2929

30-
// toBe() will always use === to compare
30+
// toBe() will always use === to compare.
3131
expect(actualValue).toBe(expectedValue);
3232
});
3333

34-
//Sometimes we will ask you to fill in the values
34+
//Sometimes we will ask you to fill in the values.
3535
it("should have filled in values", function () {
3636
expect(1 + 1).toEqual(__);
3737
});

koans/AboutFunctions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ describe("About Functions", function() {
99
expect(add(1, 2)).toBe(__);
1010
});
1111

12-
it("should know internal wariables override outer variables", function () {
12+
it("should know internal variables override outer variables", function () {
1313
var message = "Outer";
1414

1515
function getMessage() {

koans/AboutHigherOrderFunctions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ describe("About Higher Order Functions", function () {
5353
expect(msg).toEqual(__);
5454
});
5555

56-
it("should use 'every' to applies until first false" , function () {
56+
it("should use 'every' to apply until first false" , function () {
5757
var numbers = [1,2,3];
5858
var msg = "";
5959
var isEven = function (item) {

koans/AboutInheritance.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Gonzo.prototype = Muppet.prototype.beget();
6363

6464
describe("About Crockford's inheritance improvement", function() {
6565
beforeEach(function(){
66-
this.gonzo = new Gonzo(3, "daredevil performer", "eat a tire");
66+
this.gonzo = new Gonzo(3, "daredevil performer", "eat a tire");
6767
});
6868

6969
it("should be able to call a method on the derived object", function() {
@@ -76,10 +76,10 @@ describe("About Crockford's inheritance improvement", function() {
7676

7777
it("should set constructor parameters on the base object", function() {
7878
expect(this.gonzo.age).toEqual(__);
79-
expect(this.gonzo.hobby).toEqual(__);
79+
expect(this.gonzo.hobby).toEqual(__);
8080
});
8181

8282
it("should set constructor parameters on the derived object", function() {
8383
expect(this.gonzo.trick).toEqual(__);
8484
});
85-
});
85+
});

koans/AboutLambda.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe("About Lambdas", function () {
1515
expect(df.lambda("x, y -> y*2 + x*3")(2, 3)).toBe(__);
1616
});
1717

18-
it("should demonstrate a string passed to higher order functions assumed to be lambdas", function () {
18+
it("should demonstrate a string passed to higher order functions assumed to be a lambda", function () {
1919
expect(df.map([1, 2, 3], "x + 1")).toEqual(__);
2020
});
2121

koans/AboutMutability.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ describe("About Mutability", function() {
3939
expect(aPerson.getFullName()).toBe(__);
4040
});
4141

42-
it("should know that variables inside constructor and constructor args are private", function () {
42+
it("should know that variables inside a constructor and constructor args are private", function () {
4343
function Person(firstname, lastname)
4444
{
4545
var fullName = firstname + " " + lastname;

koans/AboutObjects.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ describe("About Objects", function () {
3333
});
3434

3535
it("should confirm that when a function is attached to an object, 'this' refers to the object", function () {
36-
var currentYear = 2010; // Update me!
36+
var currentDate = new Date()
37+
var currentYear = (currentDate.getFullYear());
3738
var meglomaniac = {
3839
mastermind: "James Wood",
3940
henchman: "Adam West",

0 commit comments

Comments
 (0)