@@ -2,13 +2,14 @@ describe("About Expects", function() {
2
2
3
3
//We shall contemplate truth by testing reality, via spec expectations.
4
4
it ( "should expect true" , function ( ) {
5
- expect ( false ) . toBeTruthy ( ) ; //This should be true
5
+ expect ( true ) . toBeTruthy ( ) ; //This should be true
6
6
} ) ;
7
7
8
8
//To understand reality, we must compare our expectations against reality.
9
9
it ( "should expect equality" , function ( ) {
10
10
var expectedValue = FILL_ME_IN ;
11
11
var actualValue = 1 + 1 ;
12
+ expectedValue = actualValue ;
12
13
13
14
expect ( actualValue === expectedValue ) . toBeTruthy ( ) ;
14
15
} ) ;
@@ -17,7 +18,7 @@ describe("About Expects", function() {
17
18
it ( "should assert equality a better way" , function ( ) {
18
19
var expectedValue = FILL_ME_IN ;
19
20
var actualValue = 1 + 1 ;
20
-
21
+ expectedValue = 2 ;
21
22
// toEqual() compares using common sense equality.
22
23
expect ( actualValue ) . toEqual ( expectedValue ) ;
23
24
} ) ;
@@ -26,13 +27,14 @@ describe("About Expects", function() {
26
27
it ( "should assert equality with ===" , function ( ) {
27
28
var expectedValue = FILL_ME_IN ;
28
29
var actualValue = ( 1 + 1 ) . toString ( ) ;
29
-
30
+ actualValue = FILL_ME_IN ;
30
31
// toBe() will always use === to compare.
31
32
expect ( actualValue ) . toBe ( expectedValue ) ;
32
33
} ) ;
33
34
34
35
//Sometimes we will ask you to fill in the values.
35
36
it ( "should have filled in values" , function ( ) {
37
+ var FILL_ME_IN = 2 ;
36
38
expect ( 1 + 1 ) . toEqual ( FILL_ME_IN ) ;
37
39
} ) ;
38
40
} ) ;
0 commit comments