Sha256: 1c70645ed7d4a3da207a146f55690529c1dd8539cbb38cd3308f34ba893680ef

Contents?: true

Size: 658 Bytes

Versions: 46

Compression:

Stored size: 658 Bytes

Contents

"use strict";

var setPrototypeOf = require("../../object/set-prototype-of")

  , getPrototypeOf = Object.getPrototypeOf;

module.exports = function (t, a) {
	var x = {}, obj;

	a(getPrototypeOf(t(x)), x, "Normal object");
	a(getPrototypeOf(t(null)),
		(setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Null");

	a.h1("Properties");
	a.h2("Normal object");
	a(getPrototypeOf(obj = t(x, { foo: { value: "bar" } })), x, "Prototype");
	a(obj.foo, "bar", "Property");
	a.h2("Null");
	a(getPrototypeOf(obj = t(null, { foo: { value: "bar2" } })),
		(setPrototypeOf && setPrototypeOf.nullPolyfill) || null, "Prototype");
	a(obj.foo, "bar2", "Property");
};

Version data entries

46 entries across 46 versions & 3 rubygems

Version Path
govuk_publishing_components-16.19.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-16.18.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-16.17.0 node_modules/es5-ext/test/object/create.js
optimacms-0.4.3 spec/dummy/node_modules/es5-ext/test/object/create.js
optimacms-0.4.2 spec/dummy/node_modules/es5-ext/test/object/create.js
cortex-0.1.3 spec/dummy/node_modules/es5-ext/test/object/create.js