@@ -27,6 +27,11 @@ child.b = 2;
27
27
* */
28
28
29
29
test ( "Is there an 'a' and 'b' own property on childObj?" , function ( ) {
30
+ equals ( child . hasOwnProperty ( 'a' ) , __ , 'childObj.hasOwnProperty(\'a\')?' ) ;
31
+ equals ( child . hasOwnProperty ( 'b' ) , __ , 'childObj.hasOwnProperty(\'b\')?' ) ;
32
+ } ) ;
33
+
34
+ test ( "Is there an 'a' and 'b' property on childObj?" , function ( ) {
30
35
equals ( child . a , __ , 'what is \'a\' value?' ) ;
31
36
equals ( child . b , __ , 'what is \'b\' value?' ) ;
32
37
} ) ;
@@ -37,21 +42,21 @@ 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 ( ) {
45
+ test ( "Is there a 'c' own property on childObj?" , function ( ) {
43
46
equals ( child . hasOwnProperty ( 'c' ) , __ , 'childObj.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 childObj? No, check its prototype
50
+ // Is there a 'c' own property on childObj.[[Prototype]]? Yes, its value is...
51
+ test ( "Is there a 'c' property on childObj?" , function ( ) {
52
+ equals ( child . c , __ , 'what is the value of childObj.c?' ) ;
48
53
} ) ;
49
54
50
55
51
56
// Is there a 'd' own property on childObj? No, check its prototype
52
57
// Is there a 'd' own property on childObj.[[Prototype]]? No, check it prototype
53
58
// childObj.[[Prototype]].[[Prototype]] is null, stop searching, no property found, return...
54
- test ( "Is there an 'd' own property on childObj?" , function ( ) {
59
+ test ( "Is there an 'd' property on childObj?" , function ( ) {
55
60
equals ( child . d , __ , 'what is the value of childObj.d?' ) ;
56
61
} ) ;
57
62
0 commit comments