diff --git a/topics/about_asserts.js b/topics/about_asserts.js index 57bbba18..efb297e0 100644 --- a/topics/about_asserts.js +++ b/topics/about_asserts.js @@ -4,15 +4,15 @@ $(document).ready(function(){ module("About Asserts (topics/about_asserts.js)"); test("ok", function() { - ok(true, 'what will satisfy the ok assertion?'); + ok(false, 'what will satisfy the ok assertion?'); }); test("not", function() { - not(false, 'what is a false value?'); + not(__, 'what is a false value?'); }); test("equals", function() { - equals(1+1, 2, 'what will satisfy the equals assertion?'); + equals(1+1, __, 'what will satisfy the equals assertion?'); }); }); diff --git a/topics/about_assignment.js b/topics/about_assignment.js index df083a24..25e8b95c 100644 --- a/topics/about_assignment.js +++ b/topics/about_assignment.js @@ -4,13 +4,13 @@ $(document).ready(function(){ module("About Assignment (topics/about_assignment.js)"); test("local variables", function() { - var temp = 1; //Using var sets scope to local, interesting. + var temp = __; equals(1, temp, "Assign a value to the variable temp"); }); test("global variables", function() { temp = 1; - equals(temp, window.temp, 'global variables are assigned to the window object'); + equals(temp, window.__, 'global variables are assigned to the window object'); }); }); diff --git a/topics/about_control_structures.js b/topics/about_control_structures.js index 9412c147..e4965ce0 100644 --- a/topics/about_control_structures.js +++ b/topics/about_control_structures.js @@ -28,14 +28,14 @@ $(document).ready(function(){ var result = ""; // for in enumerates the property names of an object for (property_name in person) { - result += property_name; + result = result + property_name; }; equals(result, __, 'what is the value of result?'); }); test("ternary operator", function() { var fruit = true ? "apple" : "orange"; - equals(fruit, __, 'what is the value of fruit?'); + equals(fruit, "apple", 'what is the value of fruit?'); fruit = false ? "apple" : "orange"; equals(fruit, __, 'now what is the value of fruit?'); diff --git a/topics/about_equality.js b/topics/about_equality.js index 20eeb950..ca7d5a9a 100644 --- a/topics/about_equality.js +++ b/topics/about_equality.js @@ -4,23 +4,23 @@ $(document).ready(function(){ module("About Equality (topics/about_equality.js)"); test("numeric equality", function() { - equals(3 + 4, 7, 'hmmmm?'); + equals(3 + __, 7, 'hmmmm?'); }); test("string equality", function() { - equals("3" + "7", "37", "concatenate the strings"); + equals("3" + __, "37", "concatenate the strings"); }); test("equality without type coercion", function() { - ok(3 === 3, 'what is exactly equal to 3?'); + ok(3 === __, 'what is exactly equal to 3?'); }); test("equality with type coercion", function() { - ok(3 == "3", 'what string is equal to 3, with type coercion?'); + ok(3 == __, 'what string is equal to 3, with type coercion?'); }); test("string literals", function() { - equals("frankenstein", 'frankenstein', "quote types are interchangable, but must match."); + equals("frankenstein", __, "quote types are interchangable, but must match."); }); }); diff --git a/topics/about_truthyness.js b/topics/about_truthyness.js index 563fb806..91a635bc 100644 --- a/topics/about_truthyness.js +++ b/topics/about_truthyness.js @@ -4,23 +4,23 @@ $(document).ready(function(){ module("About Truthyness (topics/about_truthyness.js)"); test("truthyness of positive numbers", function() { - var oneIsTrue = 1 ? true : false; //Why use ternary here? equals(1, true, 'is one true?'); - equals(oneIsTrue, true, 'is one true?'); + var oneIsTrue = 1 ? true : false; + equals(oneIsTrue, __, 'is one true?'); }); test("truthyness of negative numbers", function() { var negativeOneIsTrue = -1 ? true : false; - equals(negativeOneIsTrue, true, 'is -1 true?'); + equals(negativeOneIsTrue, __, 'is -1 true?'); }); test("truthyness of zero", function() { var zeroIsTrue = 0 ? true : false; - equals(zeroIsTrue, false, 'is 0 true?'); + equals(zeroIsTrue, __, 'is 0 true?'); }); test("truthyness of null", function() { var nullIsTrue = null ? true : false; - equals(nullIsTrue, false); + equals(nullIsTrue, __); }); });