-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathisPrototypeOf.html
More file actions
33 lines (30 loc) · 932 Bytes
/
Copy pathisPrototypeOf.html
File metadata and controls
33 lines (30 loc) · 932 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<script src="tinytest.js"></script>
<script src="isPrototypeOf.js"></script>
<script>
tests({
'james object should be linked to Object.prototype': function() {
var testOne = isPrototypeOf(Object.prototype, james);
eq(testOne, true);
},
'james2 object should be linked to james object prototype': function() {
var testTwo = isPrototypeOf(james, james2);
eq(testTwo === james.isPrototypeOf(james2), true);
},
'randomObject should not be linked to james prototype': function() {
var testThree = isPrototypeOf(james, randomObject);
eq(testThree === false, true);
},
'empty object with NO prototype should NOT be linked to Object.prototype.': function() {
var testFour = isPrototypeOf(Object.prototype, empty);
eq(testFour === false, true);
}
});
</script>
</body>
</html>