Skip to content

Commit e6555ec

Browse files
author
Tom Atkins
committed
First few tests passed! I'm learning somethinng!
1 parent 835fc62 commit e6555ec

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

topics/about_asserts.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
module("About Asserts (topics/about_asserts.js)");
33

44
test("ok", function() {
5-
ok(__, 'what will satisfy the ok assertion?');
5+
ok("ok", 'what will satisfy the ok assertion?');
66
});
77

88
test("not", function() {
9-
not(__, 'what is a false value?');
9+
not(NaN, 'what is a false value?');
1010
});
1111

1212
test("equals", function() {
13-
equals(1+1, __, 'what will satisfy the equals assertion?');
13+
equals(1+1, 2, 'what will satisfy the equals assertion?');
1414
});

topics/about_operators.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ test("addition", function() {
77
for (var i = 0; i <= 5; i++) {
88
result = result + i;
99
}
10-
equals(result, __, "What is the value of result?");
10+
equals(result, 15, "What is the value of result?");
1111
});
1212

1313
test("assignment addition", function() {
@@ -16,23 +16,23 @@ test("assignment addition", function() {
1616
//the code below is just like saying result = result + i; but is more concise
1717
result += i;
1818
}
19-
equals(result, __, "What is the value of result?");
19+
equals(result, 15, "What is the value of result?");
2020
});
2121

2222
test("subtraction", function() {
2323
var result = 5;
2424
for (var i = 0; i <= 2; i++) {
2525
result = result - i;
2626
}
27-
equals(result, __, "What is the value of result?");
27+
equals(result, 2, "What is the value of result?");
2828
});
2929

3030
test("assignment subtraction", function() {
3131
var result = 5;
3232
for (var i = 0; i <= 2; i++) {
3333
result -= i;
3434
}
35-
equals(result, __, "What is the value of result?");
35+
equals(result, 2, "What is the value of result?");
3636
});
3737

3838
//Assignment operators are available for multiplication and division as well
@@ -43,5 +43,5 @@ test("modulus", function() {
4343
var x = 5;
4444
//again this is exactly the same as result = result % x
4545
result %= x;
46-
equals(result, __, "What is the value of result?");
46+
equals(result, 0, "What is the value of result?");
4747
});

0 commit comments

Comments
 (0)