Sha256: baf418bc2b64ae96d253f1976ec44de3275f16fc8b3bab320779f78e49539fc2

Contents?: true

Size: 626 Bytes

Versions: 28

Compression:

Stored size: 626 Bytes

Contents

"use strict";

var WeakMapPoly = require("../polyfill");

module.exports = function (t, a) {
	var map;

	a.throws(function () {
		t(undefined);
	}, TypeError, "Undefined");
	a.throws(function () {
		t(null);
	}, TypeError, "Null");
	a.throws(function () {
		t(true);
	}, TypeError, "Primitive");
	a.throws(function () {
		t("raz");
	}, TypeError, "String");
	a.throws(function () {
		t({});
	}, TypeError, "Object");
	a.throws(function () {
		t([]);
	}, TypeError, "Array");
	if (typeof WeakMap !== "undefined") {
		map = new WeakMap();
		a(t(map), map, "Native");
	}
	map = new WeakMapPoly();
	a(t(map), map, "Polyfill");
};

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
govuk_publishing_components-18.0.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.21.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.20.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.19.1 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.19.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.18.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.17.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.16.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.15.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.14.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.13.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.12.2 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.12.1 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.12.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.11.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.10.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.9.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.8.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.7.0 node_modules/es6-weak-map/test/valid-weak-map.js
govuk_publishing_components-17.6.1 node_modules/es6-weak-map/test/valid-weak-map.js