Sha256: 01f0703ff3dc2c78423280011327526236552eb230f59dac9ba0c314f27ecb1a

Contents?: true

Size: 687 Bytes

Versions: 92

Compression:

Stored size: 687 Bytes

Contents

"use strict";

var create = require("../../../object/create")

  , getPrototypeOf = Object.getPrototypeOf;

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

	if (t === null) return;
	a(t(x, y), x, "Return self object");
	a(getPrototypeOf(x), y, "Object");
	a.throws(function () {
 t(x);
}, TypeError, "Undefined");
	a.throws(function () {
 t("foo");
}, TypeError, "Primitive");
	a(getPrototypeOf(t(x, null)), t.nullPolyfill || null, "Null");
	x = create(null);
	a.h1("Change null prototype");
	a(t(x, y), x, "Result");
	a(getPrototypeOf(x), y, "Prototype");
	a.h1("Set null prototype");
	a(t(y, null), y, "Result");
	a(getPrototypeOf(y), t.nullPolyfill || null, "Prototype");
};

Version data entries

92 entries across 46 versions & 3 rubygems

Version Path
govuk_publishing_components-18.0.0 node_modules/es5-ext/test/object/set-prototype-of/shim.js
govuk_publishing_components-18.0.0 node_modules/es5-ext/test/object/set-prototype-of/index.js
govuk_publishing_components-17.21.0 node_modules/es5-ext/test/object/set-prototype-of/shim.js
govuk_publishing_components-17.21.0 node_modules/es5-ext/test/object/set-prototype-of/index.js
govuk_publishing_components-17.20.0 node_modules/es5-ext/test/object/set-prototype-of/index.js
govuk_publishing_components-17.20.0 node_modules/es5-ext/test/object/set-prototype-of/shim.js
govuk_publishing_components-17.19.1 node_modules/es5-ext/test/object/set-prototype-of/index.js
govuk_publishing_components-17.19.1 node_modules/es5-ext/test/object/set-prototype-of/shim.js
govuk_publishing_components-17.19.0 node_modules/es5-ext/test/object/set-prototype-of/index.js
govuk_publishing_components-17.19.0 node_modules/es5-ext/test/object/set-prototype-of/shim.js
govuk_publishing_components-17.18.0 node_modules/es5-ext/test/object/set-prototype-of/shim.js
govuk_publishing_components-17.18.0 node_modules/es5-ext/test/object/set-prototype-of/index.js
govuk_publishing_components-17.17.0 node_modules/es5-ext/test/object/set-prototype-of/index.js
govuk_publishing_components-17.17.0 node_modules/es5-ext/test/object/set-prototype-of/shim.js
govuk_publishing_components-17.16.0 node_modules/es5-ext/test/object/set-prototype-of/index.js
govuk_publishing_components-17.16.0 node_modules/es5-ext/test/object/set-prototype-of/shim.js
govuk_publishing_components-17.15.0 node_modules/es5-ext/test/object/set-prototype-of/shim.js
govuk_publishing_components-17.15.0 node_modules/es5-ext/test/object/set-prototype-of/index.js
govuk_publishing_components-17.14.0 node_modules/es5-ext/test/object/set-prototype-of/index.js
govuk_publishing_components-17.14.0 node_modules/es5-ext/test/object/set-prototype-of/shim.js