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-18.0.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.21.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.20.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.19.1 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.19.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.18.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.17.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.16.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.15.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.14.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.13.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.12.2 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.12.1 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.12.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.11.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.10.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.9.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.8.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.7.0 node_modules/es5-ext/test/object/create.js
govuk_publishing_components-17.6.1 node_modules/es5-ext/test/object/create.js