@@ -26,7 +26,12 @@ child.b = 2;
26
26
* ---------------------- ---- ---- ----
27
27
* */
28
28
29
- test ( "Is there an 'a' and 'b' own property on childObj?" , function ( ) {
29
+ test ( "Is there an 'a' and 'b' own property on child?" , function ( ) {
30
+ equals ( child . hasOwnProperty ( 'a' ) , __ , 'child.hasOwnProperty(\'a\')?' ) ;
31
+ equals ( child . hasOwnProperty ( 'b' ) , __ , 'child.hasOwnProperty(\'b\')?' ) ;
32
+ } ) ;
33
+
34
+ test ( "Is there an 'a' and 'b' property on child?" , function ( ) {
30
35
equals ( child . a , __ , 'what is \'a\' value?' ) ;
31
36
equals ( child . b , __ , 'what is \'b\' value?' ) ;
32
37
} ) ;
@@ -37,22 +42,22 @@ test("If 'b' was removed, whats b value?", function () {
37
42
} ) ;
38
43
39
44
40
- // Is there a 'c' own property on childObj? No, check its prototype
41
- // Is there a 'c' own property on childObj.[[Prototype]]? Yes, its value is...
42
- test ( "Is there a 'c' own property on childObj.[[Prototype]]?" , function ( ) {
43
- equals ( child . hasOwnProperty ( 'c' ) , __ , 'childObj.hasOwnProperty(\'c\')?' ) ;
45
+ test ( "Is there a 'c' own property on child?" , function ( ) {
46
+ equals ( child . hasOwnProperty ( 'c' ) , __ , 'child.hasOwnProperty(\'c\')?' ) ;
44
47
} ) ;
45
48
46
- test ( "Is there a 'c' own property on childObj.[[Prototype]]?" , function ( ) {
47
- equals ( child . c , __ , 'childObj.c?' ) ;
49
+ // Is there a 'c' own property on child? No, check its prototype
50
+ // Is there a 'c' own property on child.[[Prototype]]? Yes, its value is...
51
+ test ( "Is there a 'c' property on child?" , function ( ) {
52
+ equals ( child . c , __ , 'what is the value of child.c?' ) ;
48
53
} ) ;
49
54
50
55
51
- // Is there a 'd' own property on childObj ? No, check its prototype
52
- // Is there a 'd' own property on childObj .[[Prototype]]? No, check it prototype
53
- // childObj .[[Prototype]].[[Prototype]] is null, stop searching, no property found, return...
54
- test ( "Is there an 'd' own property on childObj ?" , function ( ) {
55
- equals ( child . d , __ , 'what is the value of childObj .d?' ) ;
56
+ // Is there a 'd' own property on child ? No, check its prototype
57
+ // Is there a 'd' own property on child .[[Prototype]]? No, check it prototype
58
+ // child .[[Prototype]].[[Prototype]] is null, stop searching, no property found, return...
59
+ test ( "Is there an 'd' property on child ?" , function ( ) {
60
+ equals ( child . d , __ , 'what is the value of child .d?' ) ;
56
61
} ) ;
57
62
58
63
0 commit comments