]> git.r.bdr.sh - rbdr/dotfiles/blob
8b7be214136d2ffd6215f7e73fe936d0b7b9d1a1
[rbdr/dotfiles] /
1 'use strict';
2
3 var setPrototypeOf = require('../../object/set-prototype-of')
4
5 , getPrototypeOf = Object.getPrototypeOf;
6
7 module.exports = function (t, a) {
8 var x = {}, obj;
9
10 a(getPrototypeOf(t(x)), x, "Normal object");
11 a(getPrototypeOf(t(null)),
12 (setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Null");
13
14 a.h1("Properties");
15 a.h2("Normal object");
16 a(getPrototypeOf(obj = t(x, { foo: { value: 'bar' } })), x, "Prototype");
17 a(obj.foo, 'bar', "Property");
18 a.h2("Null");
19 a(getPrototypeOf(obj = t(null, { foo: { value: 'bar2' } })),
20 (setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Prototype");
21 a(obj.foo, 'bar2', "Property");
22 };