11describe ( "About Objects" , function ( ) {
22
33 describe ( "Properties" , function ( ) {
4- var meglomaniac ;
4+ var megalomaniac ;
55
66 beforeEach ( function ( ) {
7- meglomaniac = { mastermind : "Joker" , henchwoman : "Harley" } ;
7+ megalomaniac = { mastermind : "Joker" , henchwoman : "Harley" } ;
88 } ) ;
99
1010 it ( "should confirm objects are collections of properties" , function ( ) {
11- expect ( meglomaniac . mastermind ) . toBe ( FILL_ME_IN ) ;
11+ expect ( megalomaniac . mastermind ) . toBe ( FILL_ME_IN ) ;
1212 } ) ;
1313
1414 it ( "should confirm that properties are case sensitive" , function ( ) {
15- expect ( meglomaniac . henchwoman ) . toBe ( FILL_ME_IN ) ;
16- expect ( meglomaniac . henchWoman ) . toBe ( FILL_ME_IN ) ;
15+ expect ( megalomaniac . henchwoman ) . toBe ( FILL_ME_IN ) ;
16+ expect ( megalomaniac . henchWoman ) . toBe ( FILL_ME_IN ) ;
1717 } ) ;
1818 } ) ;
1919
2020
2121 it ( "should know properties that are functions act like methods" , function ( ) {
22- var meglomaniac = {
22+ var megalomaniac = {
2323 mastermind : "Brain" ,
2424 henchman : "Pinky" ,
2525 battleCry : function ( noOfBrains ) {
@@ -28,14 +28,14 @@ describe("About Objects", function () {
2828 }
2929 } ;
3030
31- var battleCry = meglomaniac . battleCry ( 4 ) ;
31+ var battleCry = megalomaniac . battleCry ( 4 ) ;
3232 expect ( FILL_ME_IN ) . toMatch ( battleCry ) ;
3333 } ) ;
3434
3535 it ( "should confirm that when a function is attached to an object, 'this' refers to the object" , function ( ) {
3636 var currentDate = new Date ( ) ;
3737 var currentYear = ( currentDate . getFullYear ( ) ) ;
38- var meglomaniac = {
38+ var megalomaniac = {
3939 mastermind : "James Wood" ,
4040 henchman : "Adam West" ,
4141 birthYear : 1970 ,
@@ -45,13 +45,13 @@ describe("About Objects", function () {
4545 } ;
4646
4747 expect ( currentYear ) . toBe ( FILL_ME_IN ) ;
48- expect ( meglomaniac . calculateAge ( ) ) . toBe ( FILL_ME_IN ) ;
48+ expect ( megalomaniac . calculateAge ( ) ) . toBe ( FILL_ME_IN ) ;
4949 } ) ;
5050
5151 describe ( "'in' keyword" , function ( ) {
52- var meglomaniac ;
52+ var megalomaniac ;
5353 beforeEach ( function ( ) {
54- meglomaniac = {
54+ megalomaniac = {
5555 mastermind : "The Monarch" ,
5656 henchwoman : "Dr Girlfriend" ,
5757 theBomb : true
@@ -60,29 +60,29 @@ describe("About Objects", function () {
6060
6161 it ( "should have the bomb" , function ( ) {
6262
63- var hasBomb = "theBomb" in meglomaniac ;
63+ var hasBomb = "theBomb" in megalomaniac ;
6464
6565 expect ( hasBomb ) . toBe ( FILL_ME_IN ) ;
6666 } ) ;
6767
6868 it ( "should not have the detonator however" , function ( ) {
6969
70- var hasDetonator = "theDetonator" in meglomaniac ;
70+ var hasDetonator = "theDetonator" in megalomaniac ;
7171
7272 expect ( hasDetonator ) . toBe ( FILL_ME_IN ) ;
7373 } ) ;
7474 } ) ;
7575
7676 it ( "should know that properties can be added and deleted" , function ( ) {
77- var meglomaniac = { mastermind : "Agent Smith" , henchman : "Agent Smith" } ;
77+ var megalomaniac = { mastermind : "Agent Smith" , henchman : "Agent Smith" } ;
7878
79- expect ( "secretary" in meglomaniac ) . toBe ( FILL_ME_IN ) ;
79+ expect ( "secretary" in megalomaniac ) . toBe ( FILL_ME_IN ) ;
8080
81- meglomaniac . secretary = "Agent Smith" ;
82- expect ( "secretary" in meglomaniac ) . toBe ( FILL_ME_IN ) ;
81+ megalomaniac . secretary = "Agent Smith" ;
82+ expect ( "secretary" in megalomaniac ) . toBe ( FILL_ME_IN ) ;
8383
84- delete meglomaniac . henchman ;
85- expect ( "henchman" in meglomaniac ) . toBe ( FILL_ME_IN ) ;
84+ delete megalomaniac . henchman ;
85+ expect ( "henchman" in megalomaniac ) . toBe ( FILL_ME_IN ) ;
8686 } ) ;
8787
8888
0 commit comments